Skip to main content

CLI tool to transcribe MP3 audio to SRT subtitles using OpenAI Whisper API

Project description

whisper-srt

CLI tool to transcribe MP3 audio files to SRT subtitle format using OpenAI Whisper API.

English | 日本語

Features

  • Simple CLI for MP3 to SRT conversion
  • High-accuracy transcription via OpenAI Whisper API (whisper-1)
  • Built-in AI/tech terminology for better recognition
  • Custom vocabulary support

Quick Start

No installation required - just run with uv:

# Set your OpenAI API key
export OPENAI_API_KEY="your-api-key"

# Transcribe (creates audio.srt)
uvx whisper-srt audio.mp3

Get your API key from OpenAI Platform.

Installation (Optional)

If you prefer a permanent install:

uv tool install whisper-srt
whisper-srt audio.mp3

Usage

whisper-srt input.mp3                    # Basic usage (default: English)
whisper-srt input.mp3 -o output.srt      # Specify output
whisper-srt input.mp3 --language ja      # Specify language (Japanese)
whisper-srt --help                       # See all options

Supported Languages

Default language is English (en).

Common language codes (ISO-639-1):

Code Language Code Language
en English ja Japanese
zh Chinese ko Korean
es Spanish fr French
de German pt Portuguese

See OpenAI Whisper documentation for all supported languages.

Custom Vocabulary

Create ~/.config/whisper-srt/vocabulary.txt with domain-specific terms:

YouTube
Podcast
MyCompanyName

Pricing

$0.006/minute (~$0.36/hour)

Development

git clone https://github.com/tomada1114/whisper-srt.git
cd whisper-srt
uv sync --dev
make ci   # lint + type-check + test

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whisper_srt-0.3.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whisper_srt-0.3.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file whisper_srt-0.3.0.tar.gz.

File metadata

  • Download URL: whisper_srt-0.3.0.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for whisper_srt-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b603d4b773c967a3006811cf5b38e1590a8ad244c9de4edab8cc8c03b0a16eaa
MD5 1d5e1e7abadbb998b229f8a25773b6ce
BLAKE2b-256 de94d85dff1d84324e1e7b07af460d7f45a87219677d3f12dd1cac39d20d7b2c

See more details on using hashes here.

File details

Details for the file whisper_srt-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: whisper_srt-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for whisper_srt-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f89e8b795119fdaacec0649fab0670cd44f58d763e0b8653bec2907a9ca61210
MD5 68597ed0d0efe56bf92f721eb23e2d14
BLAKE2b-256 b13d733188265c884ec0db582ff81392342bfbb0574709266f2e384e515c10b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page