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

Upgrade

If you have whisper-srt installed, upgrade to the latest version:

uv tool upgrade whisper-srt

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.1.tar.gz (12.5 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.1-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: whisper_srt-0.3.1.tar.gz
  • Upload date:
  • Size: 12.5 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.1.tar.gz
Algorithm Hash digest
SHA256 3546df9389ffaeaa65cc9c02195194dad26c027ed8407a1f2056042c5de3753c
MD5 34225f19882f8fdcca4b9a9975b90b4d
BLAKE2b-256 51d325b51b002f8b54af5155cba33805a1efcf502bc75d21d37fee98969a66e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: whisper_srt-0.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d49a1c644b4a19d8eefee0fbbea607a4145253471e7b73648b8c6b24ac0e32f
MD5 9a0d108f7c00a97f796b34bc261d64e6
BLAKE2b-256 09e79d833a14761cb1c9d1ac4961a9e20f633055ed331d5213b0c0f618da74e2

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