Free Windows-friendly Python app for generating subtitles from audio or video files using OpenAI Whisper. It supports a desktop GUI, command-line usage, MP4 audio extraction, language selection, and subtitle style presets.
- Desktop app with browse and drag-and-drop support
- Command-line interface for repeatable workflows
- MP3, WAV, M4A, FLAC, OGG, WMA, AAC, and MP4 input
- MP4 audio extraction through FFmpeg
- Whisper model selection:
tiny,base,small,medium,large - Language auto-detect or manual language code selection
- Subtitle styles:
karaoke,short,standard,reading - SRT, timestamped TXT, and full transcript output
- SRT caption text is cleaned of punctuation while SRT timestamps stay valid
- Works locally with no API key
- Python 3.8+
- FFmpeg installed and available in PATH
Install dependencies:
pip install -r requirements.txtVerify FFmpeg:
ffmpeg -versionpython app.pyBasic flow:
- Select or drag in an audio/video file.
- Choose model, language, subtitle style, and output formats.
- Click
Generate Subtitles. - Output files are saved beside the input file.
Basic:
python main.py audio.mp3
python main.py video.mp4Useful options:
python main.py audio.mp3 -m small
python main.py audio.mp3 --language auto
python main.py audio.mp3 --language ur
python main.py audio.mp3 --style karaoke
python main.py audio.mp3 --style standard -f srt
python main.py audio.mp3 -o output/my_subtitlesAvailable subtitle styles:
karaoke: 1-2 words per segmentshort: 2-3 words per segmentstandard: 3-5 words per segmentreading: 5-8 words per segment
Common language codes:
auto, en, ur, hi, ar, es, fr, de, it, pt, zh, ja, ko
For audio.mp3, default output naming is based on the first 5 characters:
audio_subtitle.srt
audio_subtitle.txt
audio_subtitle_full.txt
SRT example:
1
00:00:00,000 --> 00:00:01,000
Watch the
2
00:00:01,000 --> 00:00:02,000
eyesRecommended:
.\venv\Scripts\python.exe -m PyInstaller AI-Subtitle-Generator.spec --cleanIf the old EXE is locked, build into a fresh folder:
.\venv\Scripts\python.exe -m PyInstaller AI-Subtitle-Generator.spec --clean --workpath pyinstaller_work_manual --distpath dist_manualOutput:
dist_manual\AI-Subtitle-Generator.exe
- Added language auto-detect and manual language selection.
- Added subtitle style presets for karaoke, short, standard, and reading captions.
- Changed default subtitle style to 1-2 word karaoke captions.
- Removed punctuation from SRT caption text.
- Kept SRT timestamp commas intact because they are required by the SRT format.
- Fixed GUI model reloading so the selected Whisper model is reused when possible.
- Updated docs for GUI and CLI usage.
- First use may download the selected Whisper model.
- Larger models are more accurate but slower and require more RAM.
- If MP4 processing fails, confirm FFmpeg is installed and available in PATH.
- OpenAI Whisper
- FFmpeg