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-whisperVerified import paths — ran on the pinned version, not inferred.
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.
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.
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.
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.
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.
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.
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.
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.
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"`.