# Repository Briefing: m-bain/whisperX
> Source: https://repoforai.com/repo/m-bain/whisperX (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/m-bain/whisperX
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: Python
- **License**: BSD-2-Clause
- **Engineering Health**: A+ (91/100 · Maintenance 35/35 · Adoption 22/25 · Releases 14/20 · License 20/20)
- **Latest Release**: v3.8.6 (2026-05-25) — https://github.com/m-bain/whisperX/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Local AI, CLI, GPU
- **Momentum**: 26,474 ★ total (+23 24h / +677 7d) · 2,692 forks
- **Topics**: `asr`, `speech`, `speech-recognition`, `speech-to-text`, `whisper`
- **When to Use**: Best for: Local batch processing of interviews, podcasts, and meeting recordings when subtitles or transcript navigation need word timings and approximate speaker labels. Skip if: 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.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- ASR: VAD feeds faster-whisper and CTranslate2 batches, with timestamp generation disabled in the ASR pass.
- Alignment: Language-specific wav2vec2 models and dynamic programming map transcript tokens to the audio timeline.
- Diarization: pyannote-audio speaker segments are merged into transcript words as speaker IDs, not names.
- Integration: The `whisperx` CLI supports word highlighting in SRT; the Python API exposes transcription, alignment, and speaker assignment as separate stages.
- Resource controls: `--batch_size`, ASR model size, and `--compute_type int8` give operators separate ways to manage memory pressure.
- Release evolution: v3.8.6 adds Indonesian alignment, while 3.8.7rc1 adjusts Windows CUDA detection.
```

## Quick Start / Clone
```bash
pip install whisperx
```
