Skip to content
HUIAHUB

GuideAudio & speech

Transcribe audio locally with Whisper: openai-whisper, whisper.cpp or faster-whisper

Transcribe audio locally with Whisper using openai-whisper, whisper.cpp or faster-whisper, export SRT or VTT subtitles, and match the tool to your hardware.

Edited by Published 6 min read8 sources

To transcribe audio locally with Whisper, install one of three open-source runtimes and point it at your file. openai-whisper is OpenAI's reference Python package, whisper.cpp is a C/C++ port aimed at CPUs and Apple silicon, and faster-whisper is a Python reimplementation on the CTranslate2 engine. All three use the same Whisper models and are MIT licensed. Nothing leaves your machine after the model download.

What Whisper is and which model sizes exist

Whisper (opens in a new tab) is OpenAI's general-purpose speech recognition model. It handles multilingual transcription, translation into English and language identification. Both the code and the model weights are released under the MIT License, and the method is described in the Whisper paper (opens in a new tab).

The openai/whisper README lists six sizes. Four of them also come in English-only versions (the .en suffix), which the README says tend to perform better on English, most of all at the tiny and base sizes.

SizeParametersEnglish-onlyMultilingualVRAM (openai-whisper)Speed vs large
tiny39 Mtiny.entiny~1 GB~10x
base74 Mbase.enbase~1 GB~7x
small244 Msmall.ensmall~2 GB~4x
medium769 Mmedium.enmedium~5 GB~2x
large1550 Mnonelarge~10 GB1x
turbo809 Mnoneturbo~6 GB~8x

OpenAI measured those relative speeds on English speech on an A100, and notes that real speed varies with language, speaking rate and hardware. turbo is an optimized large-v3 with faster transcription and a small accuracy loss. It is not trained for translation: with --task translate it returns the original language, so use medium or large to translate.

Accuracy also varies widely by language. The README links a per-language word error rate chart for large-v2 and large-v3.

openai-whisper: the reference Python package

openai-whisper is the original implementation, built on PyTorch. The current PyPI release is 20250625. The README says the code is expected to work with Python 3.8 to 3.11.

Install openai-whisper

pip install -U openai-whisper

It needs the ffmpeg command-line tool on your system:

# Ubuntu or Debian
sudo apt update && sudo apt install ffmpeg
# macOS (Homebrew)
brew install ffmpeg
# Windows (Chocolatey or Scoop)
choco install ffmpeg
scoop install ffmpeg

If pip fails while building tiktoken, the README says you may need a Rust toolchain, and possibly pip install setuptools-rust.

Transcribe with the whisper command

whisper interview.mp3 --model turbo --language English --output_format srt --output_dir transcripts

The default model is turbo. The CLI runs on CUDA when PyTorch can see an NVIDIA GPU, otherwise on the CPU. Models download to ~/.cache/whisper unless you pass --model_dir. Leave out --language and Whisper detects it.

From Python:

import whisper

model = whisper.load_model("turbo")
result = model.transcribe("interview.mp3")
print(result["text"])

transcribe() reads the whole file and decodes it in sliding 30-second windows.

whisper.cpp: C/C++ for CPUs and Apple silicon

whisper.cpp (opens in a new tab) is a dependency-free C/C++ port maintained in the ggml-org organization; v1.9.4 shipped on 11 September 2026. Its README calls Apple silicon a first-class target: inference runs on the GPU through Metal, and the encoder can run on the Apple Neural Engine through Core ML. It also supports AVX on x86, NVIDIA (CUDA), AMD (ROCm), Vulkan, OpenVINO, Ascend and Moore Threads, and runs on macOS, Linux, Windows, iOS, Android, WebAssembly and Raspberry Pi.

Build whisper.cpp and download a model

git clone https://github.com/ggml-org/whisper.cpp.git
cd whisper.cpp
sh ./models/download-ggml-model.sh base.en
cmake -B build
cmake --build build -j --config Release

For an NVIDIA GPU, configure with cmake -B build -DGGML_CUDA=1. For Vulkan, use -DGGML_VULKAN=1. The download script fetches models already converted to whisper.cpp's ggml format, from tiny up to large-v3 and large-v3-turbo.

The README's memory table is much lower than PyTorch's VRAM figures:

ModelDiskMemory
tiny75 MiB~273 MB
base142 MiB~388 MB
small466 MiB~852 MB
medium1.5 GiB~2.1 GB
large2.9 GiB~3.9 GB

Quantized models (for example q5_0, made with the bundled quantize tool) cut memory and disk further.

Transcribe with whisper-cli

The README says whisper-cli currently expects 16-bit WAV, so convert first:

ffmpeg -i interview.mp3 -ar 16000 -ac 1 -c:a pcm_s16le interview.wav
./build/bin/whisper-cli -m models/ggml-base.en.bin -f interview.wav -osrt -ovtt -of interview

whisper-cli defaults to English (-l en). For other languages, download a multilingual model such as small and pass -l auto or a language code. The --vad flag with a Silero VAD model skips silent stretches before transcription. A bundled whisper-server example exposes an HTTP transcription API.

faster-whisper: the CTranslate2 backend

faster-whisper (opens in a new tab) is a reimplementation of Whisper by SYSTRAN on CTranslate2, an inference engine for Transformer models. The faster-whisper README claims it is up to 4 times faster than openai/whisper at the same accuracy while using less memory, with 8-bit quantization available on CPU and GPU. The project's own benchmark transcribed 13 minutes of audio with large-v2 on an RTX 3070 Ti 8 GB in 1m03s (fp16), against 2m23s for openai/whisper.

Install faster-whisper

pip install faster-whisper

It needs Python 3.9 or newer. FFmpeg does not have to be installed, because PyAV bundles the FFmpeg libraries. GPU use requires NVIDIA's cuBLAS for CUDA 12 and cuDNN 9; the README lists older ctranslate2 versions for CUDA 11 or cuDNN 8 setups. Models download automatically from Hugging Face when you name a size such as large-v3, turbo or distil-large-v3.

Transcribe with faster-whisper

from faster_whisper import WhisperModel

# GPU: device="cuda", compute_type="float16"
model = WhisperModel("small", device="cpu", compute_type="int8")
segments, info = model.transcribe("interview.mp3", beam_size=5, vad_filter=True)

print(f"Detected {info.language} ({info.language_probability:.2f})")
for seg in segments:
    print(f"[{seg.start:.2f}s -> {seg.end:.2f}s] {seg.text}")

segments is a generator, so nothing runs until you iterate over it. For long files on a GPU, BatchedInferencePipeline is a drop-in replacement that runs batched transcription, with the VAD filter on by default. The faster-whisper README documents a Python API only; for a command line it lists community projects such as whisper-ctranslate2.

Output formats: SRT, VTT and the rest

Each runtime writes subtitles differently.

Formatopenai-whisperwhisper.cppfaster-whisper
Plain text--output_format txt-otxtWrite from segments
SRT--output_format srt-osrtWrite from segments
WebVTT--output_format vtt-ovttWrite from segments
JSON--output_format json-oj / -ojf (full)Write from segments
Othertsv, all (the default)-ocsv, -olrcYour choice
Word timestamps--word_timestamps TrueExperimental optionword_timestamps=True

The openai-whisper CLI writes every format at once unless you pick one. With faster-whisper you build the file yourself. This snippet writes an SRT file from the segments:

from faster_whisper import WhisperModel

def srt_time(seconds: float) -> str:
    ms = int(round(seconds * 1000))
    h, ms = divmod(ms, 3_600_000)
    m, ms = divmod(ms, 60_000)
    s, ms = divmod(ms, 1000)
    return f"{h:02}:{m:02}:{s:02},{ms:03}"

model = WhisperModel("small", device="cpu", compute_type="int8")
segments, _ = model.transcribe("interview.mp3", vad_filter=True)

with open("interview.srt", "w", encoding="utf-8") as f:
    for i, seg in enumerate(segments, start=1):
        f.write(f"{i}\n{srt_time(seg.start)} --> {srt_time(seg.end)}\n{seg.text.strip()}\n\n")

For VTT, write a WEBVTT header line and use a full stop instead of a comma before the milliseconds.

Which way to transcribe audio locally with Whisper fits your hardware?

Use this table to pick a starting point. Model suggestions follow the memory figures above and are illustrative; try a smaller or larger size if speed or accuracy is off.

Your hardware or needRuntimeModel to start withWhy
Apple silicon Macwhisper.cppsmall or large-v3-turboMetal GPU and optional Core ML encoder
CPU-only laptop or desktopwhisper.cpp or faster-whisper (int8)base or smallLow memory footprint; 8-bit on CPU
NVIDIA GPU with CUDA 12 and cuDNN 9faster-whisperlarge-v3 or turbo in float16Batched pipeline; lower VRAM than PyTorch
AMD GPUwhisper.cppFits your VRAMROCm and Vulkan builds documented
Raspberry Pi, phone or browserwhisper.cpptiny or basePi, iOS, Android and WebAssembly listed
Translate speech into Englishopenai-whisper or faster-whispermedium or largeturbo cannot translate
Reproduce paper results or research codeopenai-whisperAnyReference implementation
English only, limited memoryAnybase.en or small.enREADME says .en helps most at small sizes
Subtitles from a command line, no Pythonwhisper.cppFits your hardware-osrt and -ovtt built in

Frequently asked questions

Can Whisper tell different speakers apart?

Not on its own. whisper.cpp has an experimental tinydiarize option (`-tdrz`) that needs a compatible model. The faster-whisper README lists community projects such as WhisperX and whisper-diarization that add speaker labels on top of the transcript.

Does any of these runtimes need an internet connection?

Only to download models. openai-whisper caches them in `~/.cache/whisper`, faster-whisper fetches CTranslate2 conversions from Hugging Face on first use, and whisper.cpp downloads ggml files with its script. After that, transcription runs offline.

Why does Whisper sometimes repeat lines or invent text during silence?

Silent stretches are a known trigger: openai-whisper even has a `--hallucination_silence_threshold` option (used with `--word_timestamps True`) that skips long silences when it suspects invented text. Voice activity detection removes non-speech before decoding. Use `vad_filter=True` in faster-whisper or `--vad` with a Silero model in whisper.cpp.

Can I use a fine-tuned Whisper model?

Yes. faster-whisper includes a script to convert Whisper models compatible with the Transformers library, including fine-tuned ones, to CTranslate2 format. whisper.cpp needs models in its ggml format; its models README covers `convert-h5-to-ggml.py` for Hugging Face fine-tunes.

Sources

  1. 1.GitHub - openai/whisper: Robust Speech Recognition via Large-Scale Weak Supervision · GitHubRepositoryPrimarygithub.com
  2. 2.GitHub - ggml-org/whisper.cpp: Port of OpenAI's Whisper model in C/C++ · GitHubRepositoryPrimarygithub.com
  3. 3.GitHub - SYSTRAN/faster-whisper: Faster Whisper transcription with CTranslate2 · GitHubRepositoryPrimarygithub.com
  4. 4.github.com/openai/whisper/blob/v20250625/whisper/transcribe.pyRepositoryPrimary
  5. 5.pypi.org/project/openai-whisperWeb
  6. 6.arxiv.org/abs/2212.04356PaperPrimary
  7. 7.github.com/ggml-org/whisper.cpp/blob/master/examples/cli/README.mdRepositoryPrimary
  8. 8.github.com/ggml-org/whisper.cpp/releasesRepositoryPrimary

Spotted an error? See our corrections policy.

Enjoyed this? Get the weekly brief.

New guides, Project & Tool of the Week and the AI developments that matter. One email, no spam.

Read next