A web application for YouTube video transcription using OpenAI Whisper and MLX-Whisper for Apple Silicon. This project provides a simple web interface to transcribe YouTube videos and download SRT subtitle files.
- 🎵 YouTube video transcription to SRT format
- 🌐 Web-based interface for easy use
- 📱 Responsive design
- 🔄 Cross-platform compatibility
- ⚡ Automatic model selection (MLX-Whisper for Apple Silicon, OpenAI Whisper for others)
- 📥 Direct SRT file download
- Python 3.8+
- FFmpeg (for audio processing)
- Apple Silicon Macs: MLX-Whisper for optimal performance
- Other platforms: OpenAI Whisper with CUDA/CPU support
- Clone the repository:
git clone https://github.com/MinjaeKim09/whisperYTtoSRT.git cd whisperYTtoSRT - Install Python dependencies:
pip install -r requirements.txt
- Install FFmpeg:
- macOS:
brew install ffmpeg - Ubuntu/Debian:
sudo apt install ffmpeg - Windows: Download from FFmpeg website
- macOS:
- Start the application:
python app.py
- Open your browser and navigate to:
http://localhost:8080 - Enter a YouTube URL and select your preferred model size.
- Click "Start Transcription" and wait for processing to complete.
- Download the generated SRT file.
- Audio Extraction: Downloads audio from the provided YouTube URL using yt-dlp
- Transcription: Processes the entire audio file using Whisper (batch processing)
- SRT Generation: Converts the transcription into standard SRT subtitle format
- Download: Provides the SRT file for download
- Tiny: Fastest processing, less accurate
- Base: Good balance of speed and accuracy
- Small: Better accuracy than base
- Medium: Recommended balance (default)
- Large: Best accuracy, slower processing
whisperYTtoSRT/
├── app.py # FastAPI web application
├── transcriber.py # Core transcription logic
├── templates/ # HTML templates
├── requirements.txt # Python dependencies
└── README.md # This file
- Uses MLX-Whisper on Apple Silicon for optimal performance
- Falls back to OpenAI Whisper on other platforms
- Subprocess isolation ensures proper memory cleanup after transcription
- Temporary files are automatically cleaned up
MIT License - see LICENSE file for details.