All models

whisperx_alignment_model

The wav2vec2 CTC aligner WhisperX uses to give Whisper transcripts word-level timestamps.

Audio and speech · 332 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (34 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
94.4M
Operations
332
Framework
PyTorch
Recurrent
No
Published
Interspeech 2023
Cited by
329 (as of 17 October 2026)
Authors
Max Bain, Jaesung Huh, Tengda Han, Andrew Zisserman
License
BSD-2-Clause
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m11243
Graph hash
9eb084755b6b291d557936d178bddaa3cecdd1ba1f9230364790673fa90c6b61
Skeleton hash
cd4d4bd2fc93db6103b3daff197a078c289be2e03637de7be23d7c719fc8f10f
Architecture hash
58d11139079d895898dfce33cf1702665d96ae713674197c71391f9aa3e5d642
Diagram SHA-256
0ed27228d5b1896b0cdbf8c20d90358c971f59bbffdd19c0a3ef249173cce874
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

transformers.AutoModelForCTC.from_config()

What it is

The model captured here is the alignment stage of WhisperX rather than Whisper itself: a wav2vec2 speech encoder with a CTC head that WhisperX runs over each audio segment to give accurate word-level timestamps using wav2vec2 alignment. WhisperX as a whole is a time-accurate speech recognition system with word-level timestamps utilising voice activity detection and forced phoneme alignment. The problem it fixes is that Whisper's timestamps are at the utterance-level, not per word, and can be inaccurate by several seconds.

The aligner is a phoneme recognition model, trained to classify the smallest unit of speech distinguishing one word from another, such as the element p in "tap". For each segment WhisperX restricts classification to the phoneme classes that appear in the segment text, then applies Dynamic Time Warping on the resulting logits matrix to obtain the optimal temporal path of phonemes. Each word's start and end time come from the start and end time of the first and last phoneme within the word. Transcript words which do not contain characters in the alignment model's dictionary cannot be aligned and therefore are not given a timing.

The member traced here is the English default: wav2vec2-base-960h, the base model pretrained and fine-tuned on 960 hours of Librispeech on 16kHz sampled speech audio. The paper's comparison of alignment models found that the base model trained on LibriSpeech performs consistently well and should be the default alignment model for WhisperX. The alignment model is language-specific, with default models provided for en, fr, de, es and it via torchaudio pipelines and many other languages via Hugging Face. The WhisperX paper was accepted to INTERSPEECH 2023.

Key idea. WhisperX reaches word-level timestamps by forced aligning each Whisper transcript segment against a phoneme recognition model's logits with Dynamic Time Warping, with a LibriSpeech wav2vec2 base model as the default aligner.

  • WhisperX
  • WhisperX alignment model
  • wav2vec2-base-960h
  • wav2vec2
  • forced alignment
  • word-level timestamps
  • phoneme alignment
  • Whisper
  • speech recognition
  • CTC
  • LibriSpeech

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{bain2023whisperxtimeaccuratespeechtranscription,
      title={WhisperX: Time-Accurate Speech Transcription of Long-Form Audio}, 
      author={Max Bain and Jaesung Huh and Tengda Han and Andrew Zisserman},
      year={2023},
      eprint={2303.00747},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2303.00747}, 
}