Simple CLI wrapper for OpenAI Speech-to-Text API
Project description
openai-whisper-api-cli
Simple Python CLI wrapper for OpenAI Speech-to-Text.
Features
- Transcribe local audio/video files with OpenAI Speech-to-Text
- API key from
--api-keyorOPENAI_API_KEY - Print result to stdout (default)
- Optionally write result to a file
- Supports multiple response formats
Install (Recommended)
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install openai-whisper-api-cli
Verify:
owhisper --version
Upgrade:
pipx upgrade openai-whisper-api-cli
Install From Source
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
Authentication
Set env var:
export OPENAI_API_KEY="sk-..."
Or pass key directly:
owhisper transcribe ./audio.mp3 --api-key "sk-..."
--api-key takes precedence over OPENAI_API_KEY.
Usage
Print transcription to stdout:
owhisper transcribe ./audio.mp3
Write transcription to file:
owhisper transcribe ./audio.mp3 --output-file ./transcript.txt
Use custom model and response format:
owhisper transcribe ./audio.mp3 \
--model gpt-4o-transcribe \
--response-format json \
--language en
Supported models
gpt-4o-transcribegpt-4o-mini-transcribegpt-4o-transcribe-diarizewhisper-1
Model list source:
CI and Publishing
GitHub Actions workflows:
.github/workflows/ci.yml: runs tests on push/PR.github/workflows/publish.yml: builds and publishes to PyPI on tag push (v*)
PyPI trusted publishing setup
- Create your project on PyPI:
openai-whisper-api-cli. - In PyPI project settings, add a Trusted Publisher:
- Owner: your GitHub org/user
- Repository:
openai-whisper-api-cli - Workflow:
publish.yml - Environment:
pypi
- In GitHub repo settings, ensure environment
pypiexists (optional protection rules).
Release
python -m pytest
python -m build
python -m twine check dist/*
git tag v0.1.0
git push origin v0.1.0
Pushing the tag triggers automated publish.
Local manual publish (optional)
python -m build
python -m twine upload dist/*
License
MIT (see LICENSE).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openai_whisper_api_cli-0.1.1.tar.gz.
File metadata
- Download URL: openai_whisper_api_cli-0.1.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2def269dfcdf87dd7fcd26090d938c97071abfc3f194e2b4ee4d4d22f686a575
|
|
| MD5 |
05682f0886b5779cb1537cbad03f497f
|
|
| BLAKE2b-256 |
0efc687bc0d04a54ce72dea64ecbcc038e33917174416c3d0b0beef7f79fcdb7
|
Provenance
The following attestation bundles were made for openai_whisper_api_cli-0.1.1.tar.gz:
Publisher:
publish.yml on NmadeleiDev/openai-whisper-api-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openai_whisper_api_cli-0.1.1.tar.gz -
Subject digest:
2def269dfcdf87dd7fcd26090d938c97071abfc3f194e2b4ee4d4d22f686a575 - Sigstore transparency entry: 973324432
- Sigstore integration time:
-
Permalink:
NmadeleiDev/openai-whisper-api-cli@322e6a3f6e4494878a44058d38892fc4b014a177 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/NmadeleiDev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@322e6a3f6e4494878a44058d38892fc4b014a177 -
Trigger Event:
push
-
Statement type:
File details
Details for the file openai_whisper_api_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: openai_whisper_api_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d460667a79adcf9574d5c43cc1d9d07b9ccc1b48132a1ceb89af09d0c29411ff
|
|
| MD5 |
5473efa6bc50feacf3479ad2c6e3f303
|
|
| BLAKE2b-256 |
31ead26684bc27c6b4ebfeef3696336f58992a7375bae10d6500ed7dd291122b
|
Provenance
The following attestation bundles were made for openai_whisper_api_cli-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on NmadeleiDev/openai-whisper-api-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openai_whisper_api_cli-0.1.1-py3-none-any.whl -
Subject digest:
d460667a79adcf9574d5c43cc1d9d07b9ccc1b48132a1ceb89af09d0c29411ff - Sigstore transparency entry: 973324435
- Sigstore integration time:
-
Permalink:
NmadeleiDev/openai-whisper-api-cli@322e6a3f6e4494878a44058d38892fc4b014a177 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/NmadeleiDev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@322e6a3f6e4494878a44058d38892fc4b014a177 -
Trigger Event:
push
-
Statement type: