New Tool Radar

Local AI

How to Transcribe Audio Faster with faster-whisper

Transcribe a recording faster with faster-whisper, the CTranslate2 reimplementation of Whisper, using the same model names and a three-line Python script.

Schematic diagram with three boxes: a practice audio file, a faster-whisper script using the base model on CPU with int8, and the transcript output with the detected language en.

OpenAI’s Whisper is accurate, but its reference implementation is slow on an ordinary computer. faster-whisper is a reimplementation of the same Whisper models on the CTranslate2 inference engine, and its README says it is up to 4 times faster than openai/whisper for the same accuracy while using less memory, with 8-bit quantization making it faster still on both CPU and GPU. You keep the same model names — tiny, base, small, medium, large-v3, turbo — and you call it from a short Python script instead of the whisper command.

Install it and run one file

Install it from PyPI. It needs Python 3.9 or newer. Unlike openai-whisper, it does not need ffmpeg installed on your system: the audio is decoded with the Python library PyAV, which bundles the ffmpeg libraries in its package.

pip install faster-whisper

The README’s own usage example loads a model and transcribes one file:

from faster_whisper import WhisperModel

model = WhisperModel("base", device="cpu", compute_type="int8")
segments, info = model.transcribe("practice-harbour.wav", 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))

Two details from the README matter. First, device="cpu" with compute_type="int8" is the documented CPU option; the GPU option is device="cuda" with compute_type="float16", which needs NVIDIA’s cuBLAS for CUDA 12 and cuDNN 9 installed. Second, segments is a generator, so the transcription only starts when you iterate over it — nothing runs until the for loop asks for results.

Try it: transcribe one practice recording

Record yourself reading one short fictional sentence — for example, “The harbour master rang the bell twice before the ferry left.” — and save it as practice-harbour.wav. Run the script above with the base model on CPU, then check the printed lines against this table:

Check What you should see If you do not see it
Detected language en with a probability close to 1 The recording is unclear, or the wrong file was passed
Transcript text The harbour master rang the bell twice before the ferry left The model misheard the recording — try a clearer recording or a larger model
Timestamps Start and end times in seconds for the segment You printed the segment objects without formatting them
Nothing happens at all Lines print as the loop runs segments is a generator — you must iterate over it or call list(segments)

If the language is English and the sentence matches, the faster engine transcribed your recording. Expected result. We checked the faster-whisper README. We did not run faster-whisper on a sample recording.

How much faster, on the project’s own numbers

The README publishes its own benchmark for transcribing 13 minutes of audio. On a GPU (NVIDIA RTX 3070 Ti 8GB, CUDA 12.4) with the large-v2 model at fp16 and beam size 5, openai/whisper took 2m23s, faster-whisper took 1m03s, and faster-whisper with batch_size=8 took 17s. On a CPU (Intel Core i7-12700K, 8 threads) with the small model, openai/whisper took 6m58s, faster-whisper took 2m37s at fp32 and 1m42s at int8, and with batch_size=8 it took 1m06s at fp32. Those are the project’s measurements on its hardware, not ours, and your times will differ — the point of the table is the shape of the gain: a different engine and 8-bit quantization, not a different model.

Limits

faster-whisper runs the same Whisper models, so it inherits their limits: it can mishear words, and a smaller model will be less accurate than a larger one. The batched pipeline (BatchedInferencePipeline with batch_size=16 in the README’s example) trades more memory for speed — the README’s CPU table shows the batched run using more RAM than the plain run. GPU use needs the NVIDIA libraries above; without them, use the CPU settings. We did not run faster-whisper, so no speed here is a measured result.

Sources

See all