Batch transcribe all audio files in a directory using faster-whisper on GPU.
pip install faster-whisper
pip install python-docx # optional, for .docx output
pip install nvidia-ml-py # optional, for VRAM-based auto model selectionRequires CUDA-capable GPU(s). Falls back to CPU automatically if none detected.
# Transcribe all audio files in a directory (auto-detects GPU + best model)
python transcribe.py /path/to/audio/files
# Use a specific model
python transcribe.py /path/to/audio/files --model large-v3
# Output to a different directory
python transcribe.py /path/to/audio/files --output /path/to/transcripts
# Include timestamps
python transcribe.py /path/to/audio/files --timestamps
# Word document output (also generates .txt companion)
python transcribe.py /path/to/audio/files --format docx --timestamps
# SRT subtitle format
python transcribe.py /path/to/audio/files --format srt
# Search subdirectories recursively
python transcribe.py /path/to/audio/files --recursive
# Force CPU
python transcribe.py /path/to/audio/files --device cpuWhen --model auto (the default), the script detects free VRAM and picks the best model:
| Free VRAM | Model | Compute |
|---|---|---|
| >= 6 GB | large-v3 | float16 |
| >= 3.5 GB | large-v3 | int8 |
| >= 2 GB | medium | int8 |
| >= 1 GB | small | int8 |
| CPU | small | int8 |
mp3, wav, m4a, flac, ogg, wma, aac, opus, webm, mp4, mkv, avi, mov