A Streamlit-based application that automatically transcribes YouTube videos into interactive, timestamped transcripts with speaker detection. Click any timestamp to jump the video player to that exact moment.
- Automatic Transcription: Uses OpenAI's Whisper model for accurate speech-to-text conversion
- GPU Acceleration: Automatically detects and uses CUDA (Nvidia) when available
- Performance Timing: Prints transcription duration to the terminal for benchmarking
- Interactive Navigation: Click any timestamp to jump the video to that exact point
- Multiple Input Methods: Process from YouTube URLs or upload local MP3 files
- Two-step Alignment: Uses WhisperX's alignment model for precise timestamps
- CPU Processing: Without a GPU, transcription is slow (~10-15 minutes per hour of video)
- GPU Support: GPU acceleration requires a compatible Nvidia GPU with CUDA. RTX 50-series GPUs require waiting for PyTorch updates
- Apple Silicon (M1/M2/M3): MPS (Metal Performance Shaders) is not yet supported by WhisperX's backend (faster-whisper/CTranslate2). Use MLX model for faster processing on Mac.
- Memory Usage: Requires 8GB+ RAM (16GB+ recommended for batch processing optimization)
- Model Size: First run downloads ~500MB of models to
~/.cache/huggingface/ - Audio Quality: Transcription accuracy depends on audio quality and clarity
Recommended for: Videos up to 2-3 hours on CPU, unlimited with a supported Nvidia GPU
- Audio Download: Downloads audio from YouTube using
yt-dlp - Transcription: Whisper model converts audio to text with word-level timestamps
- Alignment: WhisperX aligns transcription with original audio for accuracy
- Interactive UI: Streamlit renders an interactive transcript with clickable timestamps
Before installing, ensure you have:
- Python 3.12+: The programming language
- FFmpeg: For audio/video processing
- Git: To clone this repository
- Download the Windows Installer (64-bit) from python.org
- Important: Check "Add Python.exe to PATH" before clicking Install
- Open PowerShell as Administrator (search "PowerShell" → right-click → Run as Administrator)
- Run:
winget install ffmpeg - Restart your computer
git clone https://github.com/FaizHLI/transcriber.git
cd transcriber
pip install -r requirements.txtThat's it! All dependencies are automatically resolved.
Open Terminal and run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"brew install python@3.12 ffmpeg gitgit clone https://github.com/FaizHLI/transcriber.git
cd transcriber
pip3 install -r requirements.txtNote about Apple Silicon (M1/M2/M3):
Currently, WhisperX uses faster-whisper as its backend, which doesn't support MPS (Metal Performance Shaders) yet. Your Mac will automatically fall back to CPU processing. MPS support is being developed by the faster-whisper/CTranslate2 teams, but is not available at this time.
sudo apt-get install python3.12 ffmpeg git
git clone https://github.com/FaizHLI/transcriber.git
cd transcriber
pip install -r requirements.txt- Open Terminal/Command Prompt and navigate to the repository:
cd path/to/your/repo- Run the application:
streamlit run app.py- The app will open in your browser at
http://localhost:8501
- Select "YouTube URL" from the sidebar
- Paste a YouTube link
- (Optional) Check "Delete audio after processing" to save storage
- Click "Process Video"
- Wait for processing (first run downloads ~500MB of models)
- Click timestamps to jump the video player
- Select "Upload MP3" from the sidebar
- Upload an MP3 file
- (Optional) Paste a YouTube URL to display the video player
- Click "Process Audio"
- Navigate using the interactive transcript
- CUDA (Nvidia GPU): Fastest processing (~1-2 minutes for 1 hour video) -- torch needs updates for RTX 50-series GPUs
- CPU (Intel/AMD/Apple Silicon): Slower (~10-15 minutes for 1 hour video)
The app automatically detects and uses the best available device. Apple Silicon Macs will use CPU until MPS support is added to faster-whisper.
You can optimize performance by adjusting the batch size in app.py:
Line 91: result = model.transcribe(audio, batch_size=96, language="en")
- Higher batch size (128, 256): Faster processing but uses more RAM
- Default, Lower batch size (32, 48): Slower but more memory-efficient
- (96): Optimized for 32GB+ RAM systems
Recommendations:
- 32GB+ RAM:
batch_size=96-128(recommended default) - 16GB RAM:
batch_size=64 - 8GB RAM:
batch_size=32-48 - M1 MacBook Pro (8GB unified memory):
batch_size=16-32max
| Problem | Solution |
|---|---|
| "Python not found" | Reinstall Python and check "Add Python.exe to PATH" |
| "FFmpeg not found" | Restart your computer after installing FFmpeg |
| YouTube download fails | Update yt-dlp: pip install -U yt-dlp |
| Out of memory | Reduce batch size in app.py or close other applications |
| Models won't download | Check internet connection. Models cache at ~/.cache/huggingface/ |
| Slow transcription | Increase batch size in app.py if you have RAM available |
| "unsupported device mps" | This is expected. WhisperX doesn't support MPS yet. App will use CPU automatically |
├── app.py # Main Streamlit application
├── requirements.txt # Python dependencies
└── README.md # This file
All dependencies are automatically installed via pip install -r requirements.txt:
- whisperx: Speech-to-text transcription with alignment
- yt-dlp: YouTube audio downloader
- streamlit: Web application framework
PyTorch and other required packages are automatically resolved by pip.