# faster-whisper

> Whisper transcription on CTranslate2, several times faster at the same accuracy

- Category: Multimodal Generation / Audio, Music & Voice
- Language: Python
- Licence: MIT
- Repository: https://github.com/SYSTRAN/faster-whisper
- Canonical page: https://ai-tldr.dev/tools/faster-whisper/

## In short

faster-whisper is a reimplementation of OpenAI's Whisper model on top of CTranslate2, the fast inference engine for Transformer models from the OpenNMT project. It sits in the Audio, Music & Voice category of the Multimodal Generation tools and is open-source, written in Python and licensed MIT. To get started: install.

## Overview

faster-whisper is a reimplementation of OpenAI's Whisper model on top of CTranslate2, the fast inference engine for Transformer models from the OpenNMT project. The API is deliberately small — you construct a `WhisperModel` with a size, a device and a compute type, then call `transcribe()` and iterate the segments it yields — but underneath the model runs through CTranslate2's optimised kernels instead of PyTorch.

The project's published benchmarks put it up to four times faster than `openai/whisper` at the same accuracy while using less memory, and 8-bit quantization improves that further on both CPU and GPU. On the large-v2 benchmark with a beam size of 5, the README records 2m23s and 4,708 MB for openai/whisper against 1m03s and 4,525 MB for faster-whisper, dropping to 16s with int8 at `batch_size=8`. FFmpeg does not have to be installed on the system: audio is decoded with PyAV, which bundles the FFmpeg libraries.

Practical transcription features come with it — batched inference through `BatchedInferencePipeline`, word-level timestamps, and a Silero VAD filter that drops silent stretches (on by default for batched transcription). Distil-Whisper checkpoints such as `distil-large-v3` load through the same API, and a conversion script turns any Transformers-compatible Whisper model, including your own fine-tunes, into the CTranslate2 format. GPU execution needs cuBLAS for CUDA 12 and cuDNN 9. A large ecosystem builds on it, from WhisperX to OpenAI-compatible servers.

## What it does

- CTranslate2 backend — up to 4x faster than the reference Whisper implementation at equal accuracy
- int8 quantization on CPU and GPU for lower memory and higher throughput
- `BatchedInferencePipeline` as a drop-in replacement for batched transcription
- Word-level timestamps and a built-in Silero VAD filter with tunable parameters
- Works with Distil-Whisper checkpoints and with your own converted fine-tunes
- No system FFmpeg required — audio is decoded through PyAV

## Getting started

Install from PyPI, pick a model size and a compute type, then iterate the segment generator. GPU use requires cuBLAS for CUDA 12 and cuDNN 9.

1. Install

   Python 3.9 or greater, in a virtual environment.

```bash
pip install faster-whisper
```

2. Transcribe a file

   `segments` is a generator — transcription only starts when you iterate it.

```python
from faster_whisper import WhisperModel

model = WhisperModel("large-v3", device="cuda", compute_type="float16")

segments, info = model.transcribe("audio.mp3", beam_size=5)
print("Detected language '%s' with probability %f" % (info.language, info.language_probability))

for segment in segments:
    print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
```

3. Run int8 on CPU, or batch on GPU

   Compute type selects the precision; the batched pipeline wraps the same model for higher throughput.

```python
# CPU, 8-bit
model = WhisperModel("large-v3", device="cpu", compute_type="int8")

# GPU, batched
from faster_whisper import BatchedInferencePipeline
batched_model = BatchedInferencePipeline(model=WhisperModel("turbo", device="cuda", compute_type="float16"))
segments, info = batched_model.transcribe("audio.mp3", batch_size=16)
```

4. Add word timestamps and VAD

   Word timestamps expose per-word start and end times; the VAD filter removes non-speech audio before transcription.

```python
segments, _ = model.transcribe("audio.mp3", word_timestamps=True)
for segment in segments:
    for word in segment.words:
        print("[%.2fs -> %.2fs] %s" % (word.start, word.end, word.word))

segments, _ = model.transcribe(
    "audio.mp3",
    vad_filter=True,
    vad_parameters=dict(min_silence_duration_ms=500),
)
```

## When to use it

- Cut the GPU bill or the wall-clock time of a bulk transcription job without changing model quality
- Transcribe on CPU where a PyTorch Whisper deployment would be too slow, using int8
- Build subtitle or caption pipelines that need word-level timing
- Serve speech-to-text behind your own API — it is the backend for WhisperX, WhisperLive and OpenAI-compatible servers
