Registry / ai-ml / faster-whisper

faster-whisper

JSON →
library1.2.1pypypi✓ verified 26d ago

Faster Whisper is a re-implementation of OpenAI's Whisper model using CTranslate2, which allows for faster inference and reduced memory usage. It is highly optimized for CPU and GPU, supporting various compute types. The current version is 1.2.1, with an active release cadence, frequently adding new features, model support, and performance improvements.

pip install faster-whisper
INSTALL
IMPORT
SIG · FASTER-WHISPER
F
faster-whisper
ai-mlpythonv1.2.1
Install
12.2s avg
Import
828ms
Disk
457MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
build_error
glibc
py 3.103.910 runs
installs and imports cleanly · install 12.2s · import 0.828s · 479MB
457MB installed
● package 457MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WhisperModel
from faster_whisper import WhisperModel

Demonstrates loading a Whisper model and transcribing an audio file. The model will automatically download from Hugging Face Hub if not already cached. Uses CPU by default for broad compatibility; change `device` and `compute_type` for GPU acceleration.

from faster_whisper import WhisperModel import os # Ensure you have an audio file named 'audio.mp3' in the current directory # For example, download a short audio clip or record one. # Example: https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3 model_size = os.environ.get('WHISPER_MODEL_SIZE', 'tiny.en') # e.g., 'large-v3', 'medium', 'tiny.en' # Run on CPU with INT8 compute type for general compatibility # For GPU, change device='cuda' and compute_type='float16' if supported model = WhisperModel(model_size, device='cpu', compute_type='int8') # Transcribe the audio file # Replace 'audio.mp3' with the path to your audio file segments, info = model.transcribe("audio.mp3", beam_size=5) print(f"Detected language '{info.language}' with probability {info.language_probability:.2f}") for segment in segments: print(f"[{segment.start:.2f}s -> {segment.end:.2f}s] {segment.text}")
Debug
Known issues
breakingVersion 1.0.0 upgraded CTranslate2 to v4.0, which added support for CUDA 12. Users on older CUDA versions (e.g., CUDA 11.x) might face compatibility issues and need to downgrade CTranslate2 or use a compatible `faster-whisper` version.
fix
Ensure your CUDA toolkit and CTranslate2 version are compatible. If on older CUDA, consider installing a specific CTranslate2 version (e.g., `pip install ctranslate2<4.0`) or using a `faster-whisper` version prior to 1.0.0.
affects: >=1.0.0
breakingIn version 1.1.0, some Voice Activity Detection (VAD) parameters were renamed. However, this change was reverted in version 1.1.1. If you implemented VAD parameter tuning with v1.1.0, your code might break when upgrading to v1.1.1 or later due to the reversion to original names.
fix
If using v1.1.0, review VAD parameter names when upgrading. For versions 1.1.1 and later, refer to the documentation for the established VAD parameter names, which were restored to their pre-1.1.0 state.
affects: 1.1.0
gotchaOlder versions (prior to 1.1.1) and certain VAD configurations could lead to high RAM usage and Out-Of-Memory (OOM) errors, particularly with longer audio files or larger batch sizes.
fix
Upgrade to `faster-whisper` v1.1.1 or newer, which includes fixes for VAD-related OOM errors. Monitor memory usage, especially when enabling VAD or using batched inference, and adjust VAD parameters or batch sizes if necessary.
affects: <1.1.1
gotchaWhen using batched inference, specific issues regarding `clip_timestamps` and the `<|nocaptions|>` token were fixed in version 1.2.1. In earlier versions, these features might not have behaved as expected in batched mode, potentially leading to incorrect timestamp merging or token suppression.
fix
Upgrade to `faster-whisper` v1.2.1 or newer to ensure correct behavior of `clip_timestamps` and `suppress_tokens` (including `<|nocaptions|>`) during batched inference. Always test batched inference with your specific use case.
affects: <1.2.1
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'faster_whisper'
The 'faster-whisper' package is either not installed in your Python environment or the Python interpreter you are using does not have access to the installed package.
fix
Ensure you have installed the package using `pip install faster-whisper` and that you are running your script within the correct Python environment where it was installed.
RuntimeError: CUDA out of memory
The GPU does not have sufficient VRAM to load the chosen Whisper model or process the audio with the current parameters (e.g., model size, compute type, batch size).
fix
Try using a smaller model (e.g., 'small' instead of 'large'), set `device='cpu'` to run on the CPU, reduce the `compute_type` (e.g., from 'float16' to 'int8'), or process the audio in smaller segments if possible.
OSError: [Errno 101] Network is unreachable
This error typically occurs when `faster-whisper` attempts to download a model from the Hugging Face Hub but fails due to a lack of internet connectivity or issues reaching the Hugging Face servers.
fix
Check your internet connection. If you have a local copy of the model, ensure it's in the correct cache directory, or explicitly set `local_files_only=True` if you intend to only use local models. You may also manually download the model files from Hugging Face and place them in your `HUGGINGFACE_HUB_CACHE` directory.
AttributeError: module 'faster_whisper' has no attribute 'BatchedInferencePipeline'
You are attempting to use a feature, such as `BatchedInferencePipeline`, that is not available in the installed version of `faster-whisper`. This often happens when a feature is newly added to the library's main branch but has not yet been included in a stable PyPI release.
fix
Upgrade your `faster-whisper` installation to the latest version using `pip install --upgrade faster-whisper`. If the feature is very new and not yet in a stable release, you might need to install directly from the GitHub main branch: `pip install "faster-whisper @ https://github.com/SYSTRAN/faster-whisper/archive/refs/heads/main.tar.gz"`.
Upgrade
Version history
1.2.1latest on PyPI · released Oct 31, 2025
Audit
Dependencies
ctranslate2requiredCore dependency for faster inference, specific versions can impact CUDA/CPU compatibility.
PyAVoptionalRequired for transcribing common audio file formats (e.g., MP3, WAV).
onnxruntimeoptionalRequired for Voice Activity Detection (VAD) via Silero-VAD.
Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources
faster-whisper — pip install faster-whisper · libregistry