SubgenAI is a lightweight and efficient command-line tool that uses OpenAI's Whisper model to automatically transcribe and generate subtitles (.srt) from video files.
✨ With a few simple commands, you can:
- Extract audio from any video
- Generate accurate subtitles
- Optionally translate them into English
- Save directly as
.srtwith automatic or custom file naming
- 🎯 Simple CLI – Run directly from your terminal
- 📝 Automatic Naming – Saves as
video_name.srtif no output is specified - 🌍 Translate to English – From any source language
- ⚡ Clean & Efficient – Uses temporary storage and cleans up automatically
- 🔄 Flexible Models – Choose from
tiny,base,small,medium,large
- Language: Python
- Transcription: OpenAI Whisper
- Audio Extraction: FFmpeg
Before using SubgenAI, make sure you have:
- 🐍 Python 3.8+
- 🎵 FFmpeg (required for audio extraction)
- Windows: Download from the official FFmpeg site and add the
binfolder to PATH - macOS (Homebrew):
brew install ffmpeg
- Linux (apt):
sudo apt update && sudo apt install ffmpeg
Clone the repository:
git clone https://github.com/nfs-tech-bd/subgenAI
cd subgenAIWindows:
python -m venv venv
.\env\Scripts\ctivatemacOS / Linux:
python3 -m venv venv
source venv/bin/activateInstall dependencies:
pip install -r requirements.txtbase).
python subgenai.py --video "my_video.mp4"👉 Output: my_video.srt
python subgenai.py --video "my_video.mp4" --output "custom_subs.srt"python subgenai.py --video "my_video.mp4" --output "custom_subs.srt" --model "medium"| Model | Speed 🚀 | Accuracy 🎯 | Size 💾 |
|---|---|---|---|
| tiny | Fastest | Lowest | ~75 MB |
| base | Fast | Medium | ~142 MB |
| small | Balanced | Good | ~466 MB |
| medium | Slower | Very Good | ~1.5 GB |
| large | Slowest | Best | ~3 GB |
This project is licensed under the MIT License.
💡 Built with ❤️ by Nafis Fuad with python and a lot of curiosity.
