m-bain/whisperX
Batched Whisper with forced alignment for word timings and optional speaker labels
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
WhisperX separates transcript generation from timestamp recovery and speaker assignment. Voice activity detection (VAD) segments the recording before faster-whisper runs batched Whisper inference through CTranslate2. The ASR pass disables timestamp generation so each sample can be decoded in a single batched pass. A separate, language-specific wav2vec2 alignment stage uses dynamic programming to match the recognized text to the audio and recover word boundaries.
Optional pyannote-audio diarization produces speaker intervals; assign_word_speakers maps those intervals onto the aligned transcript. The whisperx CLI assembles the pipeline, while the Python API exposes the stages separately for applications that need to supply an alignment model or omit diarization. The package manifest includes PyTorch 2.8.x, Transformers, pyannote-audio, and Hugging Face Hub alongside the CTranslate2 ASR backend.
Key Capabilities & Differentiators
WhisperX is designed for file-based transcription with word-level timestamps. --highlight_words True uses those timings for word highlighting in SRT subtitles, and --language selects the recognition language. Alignment coverage depends on a language-specific model, rather than Whisper's language coverage alone. For conversations with a known speaker count, --min_speakers and --max_speakers can constrain diarization; the output still contains speaker IDs rather than names.
The reported batched transcription throughput is 70× realtime with large-v2. A separate memory figure puts the faster-whisper large-v2 backend below 8 GB at beam_size=5. Neither figure establishes end-to-end throughput or peak memory once alignment and diarization are included. Forced alignment can use optional Numba JIT-compiled loops and falls back to PyTorch when Numba is absent.
Trade-offs & Limitations
Unlike upstream Whisper, WhisperX uses VAD-based segmentation and batched decoding without native timestamps, then runs forced alignment. This improves timing granularity, but the transcript can differ from upstream Whisper because decoding and segmentation differ. Unsupported alignment tokens, such as some formatted numbers and currency amounts, can have no word timestamp. Overlapping speech is difficult, and diarization labels can be wrong even when the transcript is usable.
Compared with a hosted Whisper API, local execution keeps recordings in your environment but makes you responsible for model provisioning, runtime compatibility, and capacity. Compare the specific hosted endpoint's word-timestamp and speaker-label support before substituting it. WhisperX is a better fit for batch jobs than for low-latency streaming: 70× realtime batch throughput does not establish the time to a first partial transcript.
Hardware & Deployment Guide
The package manifest targets Python 3.10–3.13. Install the stable package with pip install whisperx, or launch it with uvx whisperx. For NVIDIA GPU deployment on Linux or Windows, use the CUDA 12.8 setup path and validate driver and runtime compatibility. The CPU path uses --device cpu --compute_type int8, including on macOS. FFmpeg may need to be installed separately. Size jobs with the actual models, batch size, and concurrency planned for production.
Inference runs locally, but the relevant model weights must be available before an offline run. Diarization requires accepting the Hugging Face agreement for speaker-diarization-community-1 and a read token to obtain the model. Release v3.8.5 pinned torchvision and TorchCodec for PyTorch 2.8 compatibility; v3.8.6 added Indonesian alignment and fixed ignore interpolation handling. Test the Windows CUDA detection change in 3.8.7rc1 if relevant, but pin a validated stable release for production.
whisperx CLI supports word highlighting in SRT; the Python API exposes transcription, alignment, and speaker assignment as separate stages.--batch_size, ASR model size, and --compute_type int8 give operators separate ways to manage memory pressure.Local batch processing of interviews, podcasts, and meeting recordings when subtitles or transcript navigation need word timings and approximate speaker labels.
You need live partial transcripts, reliable named speakers in overlapping speech, complete word timings across unsupported languages or tokens, or a managed API with no local model operations.
Quick Start & Installation
pip install whisperxComparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| whisperX ★ | 26.5k | +677 | Python | BSD-2-Clause | Batched Whisper with forced alignment for word timings and optional speaker labe |
| mlx-audio | 8.4k | +32 | Python | MIT | MLX inference SDK for local speech and audio pipelines on Apple Silicon |
| RealtimeSTT | 10.3k | +11 | Python | Apache-2.0 | Local streaming speech-to-text: a Python SDK and FastAPI service for low-latency |
| sherpa-onnx | 16.4k | +136 | C++ | Apache-2.0 | C++ and ONNX Runtime SDK for offline speech and real-time transcription |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/m-bain/whisperX.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about whisperX
How do I integrate WhisperX into a Python processing pipeline?
whisperx.load_model, decode the recording with whisperx.load_audio, and call transcribe. Use the returned language with load_align_model, then pass the ASR segments and audio to align. For speaker labels, run DiarizationPipeline on the audio and merge its output with the aligned transcript using assign_word_speakers. Keep missing word times representable in your downstream schema.Can I size an entire deployment around an 8 GB GPU?
large-v2 backend with beam_size=5; it is not a peak-VRAM budget for the complete pipeline or concurrent jobs. Measure ASR, alignment, and diarization on representative recordings. Reduce --batch_size first under memory pressure; a smaller ASR model or INT8 is another option, with a possible accuracy cost. CPU INT8 is supported, but do not size it using the GPU throughput figure.Can I self-host WhisperX commercially, and what must I check?
speaker-diarization-community-1 model requires accepting its Hugging Face agreement and using a read token for access. Local inference keeps audio processing in your environment, but you still need to manage recording consent, retention, and access to transcripts.When should I choose WhisperX over upstream Whisper or a hosted Whisper API?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy