How systran/faster-whisper works
faster-whisper is a Python Whisper transcription runtime backed by CTranslate2. An application supplies audio and configures WhisperModel, which loads a converted model, decodes and optionally filters audio, extracts log-Mel features, runs Whisper inference, and yields timestamped transcription segments. Tokenization supports multilingual transcription/translation, while optional batching and word-level alignment enrich results. The graph emphasizes runtime control flow; several internal calls are inferred from documented behavior and sampled excerpts, while unsampled implementation details are intentionally omitted.
Main entry points: transcribe.py Whisper Model · utils.py Model Loader · audio.py Audio Decoder · vad.py Speech Detector
Components 17
Public API
- Whisper Model
faster_whisper/transcribe.py - Batch Pipeline
faster_whisper/transcribe.py - Model Loader
faster_whisper/utils.py
Audio Preparation
- Audio Decoder
faster_whisper/audio.py - Speech Detector
faster_whisper/vad.py - Chunk Builder
faster_whisper/vad.py - Feature Extractor
faster_whisper/feature_extractor.py
Model Runtime
- Segment Generator
faster_whisper/transcribe.py - Tokenizer
faster_whisper/tokenizer.py
Result Processing
- Word Alignment
faster_whisper/transcribe.py - Transcription Results
faster_whisper/transcribe.py
Other components
- Application
- Audio Input
- Model Hub
- PyAV Decoder
- Silero Runtime
- CTranslate2 Runtime
Connections 20
- Application → Whisper Model: calls
- Audio Input → Whisper Model: supplies audio
- Application → Batch Pipeline: chooses batching
- Whisper Model → Model Loader: loads model
- Model Loader → Model Hub: downloads from
- Whisper Model → Audio Decoder: decodes audio
- Audio Decoder → PyAV Decoder: uses
- Whisper Model → Speech Detector: detects speech
- Speech Detector → Silero Runtime: runs model
- Whisper Model → Chunk Builder: collects chunks
- Whisper Model → Feature Extractor: extracts features
- Whisper Model → Segment Generator: generates segments
- Segment Generator → Tokenizer: decodes tokens
- Segment Generator → CTranslate2 Runtime: runs inference
- Batch Pipeline → CTranslate2 Runtime: runs batches
- Batch Pipeline → Word Alignment: adds timestamps
- Segment Generator → Word Alignment: aligns words
- Segment Generator → Transcription Results: yields segments
- Word Alignment → Transcription Results: enriches segments
- Transcription Results → Application: returns results