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.
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.
| Size | Parameters | English-only | Multilingual | VRAM (openai-whisper) | Speed vs large |
|---|---|---|---|---|---|
| tiny | 39 M | tiny.en | tiny | ~1 GB | ~10x |
| base | 74 M | base.en | base | ~1 GB | ~7x |
| small | 244 M | small.en | small | ~2 GB | ~4x |
| medium | 769 M | medium.en | medium | ~5 GB | ~2x |
| large | 1550 M | none | large | ~10 GB | 1x |
| turbo | 809 M | none | turbo | ~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:
| Model | Disk | Memory |
|---|---|---|
| tiny | 75 MiB | ~273 MB |
| base | 142 MiB | ~388 MB |
| small | 466 MiB | ~852 MB |
| medium | 1.5 GiB | ~2.1 GB |
| large | 2.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.
| Format | openai-whisper | whisper.cpp | faster-whisper |
|---|---|---|---|
| Plain text | --output_format txt | -otxt | Write from segments |
| SRT | --output_format srt | -osrt | Write from segments |
| WebVTT | --output_format vtt | -ovtt | Write from segments |
| JSON | --output_format json | -oj / -ojf (full) | Write from segments |
| Other | tsv, all (the default) | -ocsv, -olrc | Your choice |
| Word timestamps | --word_timestamps True | Experimental option | word_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 need | Runtime | Model to start with | Why |
|---|---|---|---|
| Apple silicon Mac | whisper.cpp | small or large-v3-turbo | Metal GPU and optional Core ML encoder |
| CPU-only laptop or desktop | whisper.cpp or faster-whisper (int8) | base or small | Low memory footprint; 8-bit on CPU |
| NVIDIA GPU with CUDA 12 and cuDNN 9 | faster-whisper | large-v3 or turbo in float16 | Batched pipeline; lower VRAM than PyTorch |
| AMD GPU | whisper.cpp | Fits your VRAM | ROCm and Vulkan builds documented |
| Raspberry Pi, phone or browser | whisper.cpp | tiny or base | Pi, iOS, Android and WebAssembly listed |
| Translate speech into English | openai-whisper or faster-whisper | medium or large | turbo cannot translate |
| Reproduce paper results or research code | openai-whisper | Any | Reference implementation |
| English only, limited memory | Any | base.en or small.en | README says .en helps most at small sizes |
| Subtitles from a command line, no Python | whisper.cpp | Fits 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.GitHub - openai/whisper: Robust Speech Recognition via Large-Scale Weak Supervision · GitHubRepositoryPrimarygithub.com
- 2.GitHub - ggml-org/whisper.cpp: Port of OpenAI's Whisper model in C/C++ · GitHubRepositoryPrimarygithub.com
- 3.GitHub - SYSTRAN/faster-whisper: Faster Whisper transcription with CTranslate2 · GitHubRepositoryPrimarygithub.com
- 4.github.com/openai/whisper/blob/v20250625/whisper/transcribe.pyRepositoryPrimary
- 5.pypi.org/project/openai-whisperWeb
- 6.arxiv.org/abs/2212.04356PaperPrimary
- 7.github.com/ggml-org/whisper.cpp/blob/master/examples/cli/README.mdRepositoryPrimary
- 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
- RoundupAudio & speech
Open source text to speech you can run yourself: Piper, Kokoro and more
Compare open source text to speech engines Piper, Kokoro, Coqui TTS and Chatterbox by licence, languages and hardware, then pick one you can ship.
7 min read
- Weekly digest
The week on HuiaHub: sandboxed agents, RAG tooling and local models
41 new HuiaHub pages this week: sandboxing coding agents, RAG retrieval, local models on Macs and phones, Claude Haiku 5.5 and six how-to guides.
4 min read
ExplainerAgents & automationAI agents found in US bank accounts: what banks are blocking and why
See which banks are restricting AI agents in bank accounts, how read-only access differs from credential sharing, and which claims remain unverified.
10 min read