WhisperX transcribes audio with batched Whisper inference, then aligns words using phoneme models for sharper timestamps. Optional speaker diarization labels who spoke when you provide a Hugging Face token.
Overview
WhisperX extends Whisper-style automatic speech recognition by adding voice-activity preprocessing, batching for faster throughput, and forced alignment so each word gets a time range instead of coarse utterance-level marks. It targets long recordings where vanilla Whisper timestamps can drift by seconds.
The default workflow is a command-line tool: point it at a WAV file, pick a Whisper model size, and receive transcripts plus subtitle-friendly output. Alignment models are chosen automatically for several European languages via torchaudio or Hugging Face; other languages need a suitable phoneme ASR checkpoint.
GPU runs use CUDA when available; CPU and int8 compute types are supported for machines without a GPU, including macOS. Flags control batch size, highlighting words in SRT output, conditioning on previous context, and min or max speaker counts during diarization.
Developers can also call the pipeline from Python. Optional Numba accelerates alignment loops on GPU batches, and a faster-whisper backend is integrated for inference. Limitations noted by the authors include tricky overlapping speech, imperfect diarization, and characters outside the aligner dictionary lacking timings.
Key features
- Batched Whisper transcription
- Word-level wav2vec2 alignment
- VAD preprocessing before ASR
- Optional speaker diarization
- Multi-language alignment models
- CLI and Python interfaces
- faster-whisper backend support
- Subtitle output with word highlights
Use cases
- Generating accurate subtitles from recordings
- Labeling speakers in meeting audio
- Batch transcribing long interview files
- Research workflows needing word timings