Overview
whisper.cpp is a port of OpenAI's Whisper automatic speech recognition model written in plain C and C++ with no external dependencies. The whole high-level model lives in two files, `include/whisper.h` and `src/whisper.cpp`; everything underneath is the ggml tensor library, the same foundation as llama.cpp. That compactness is the point — it makes the model something you can drop into an application rather than a Python service you have to operate next to one.
The build targets a wide spread of hardware rather than one accelerator. Apple Silicon is a first-class target through ARM NEON, the Accelerate framework, Metal and Core ML, where running the encoder on the Neural Engine is reported to be more than three times faster than CPU-only. Beyond that there are AVX intrinsics for x86, VSX for POWER, and backends for NVIDIA CUDA, AMD ROCm, AMD Ryzen AI NPUs, Vulkan, OpenVINO, Ascend NPUs and Moore Threads GPUs. Inference runs in mixed F16/F32 with no memory allocations at runtime, and integer quantization shrinks the models further.
Because it is just a library and a CLI, it ships everywhere the model needs to go: macOS, iOS, Android, Linux, FreeBSD, Windows, WebAssembly, Raspberry Pi and a Docker image, with bindings including Java and npm. Models are used in the project's own `ggml` format, downloaded by a script in the repo, and voice activity detection is built in. The project is MIT licensed and maintained under the ggml organisation.
What it does
- Plain C/C++ implementation with zero dependencies and no runtime memory allocation
- Backends for Metal/Core ML, CUDA, ROCm, Vulkan, OpenVINO, Ascend and AMD Ryzen AI NPUs, plus AVX and VSX CPU paths
- Integer quantization (e.g. Q5_0) to cut model size and memory
- Built-in voice activity detection (VAD)
- Runs on macOS, iOS, Android, Linux, Windows, Raspberry Pi, WebAssembly and Docker
- A C-style API in `whisper.h` plus bindings, so it embeds directly in applications
Getting started
Clone the repo, fetch a model in ggml format, build the CLI with CMake and transcribe a 16-bit WAV file.
Clone and download a model
Models are converted to the project's ggml format; the download script fetches them by name.
git clone https://github.com/ggml-org/whisper.cpp.git
cd whisper.cpp
sh ./models/download-ggml-model.sh base.enBuild and transcribe
Builds the `whisper-cli` example, then runs it against one of the bundled samples.
cmake -B build
cmake --build build -j --config Release
./build/bin/whisper-cli -f samples/jfk.wavConvert your own audio first
The CLI reads 16-bit WAV, so convert other formats to 16 kHz mono PCM before transcribing.
ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le output.wavQuantize the model to save memory
The `quantize` tool rewrites a ggml model at a lower bit width; pass the quantized file to the CLI with `-m`.
./build/bin/quantize models/ggml-base.en.bin models/ggml-base.en-q5_0.bin q5_0
./build/bin/whisper-cli -m models/ggml-base.en-q5_0.bin ./samples/gb0.wavCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Transcribe audio entirely on-device, so recordings never leave the machine
- Embed speech recognition in a desktop, mobile or embedded app through a C API instead of shipping a Python runtime
- Run Whisper on hardware without a CUDA GPU — Apple Silicon, a Raspberry Pi, an NPU or plain CPU
- Build an offline voice command layer or a browser-side transcriber via the WebAssembly build
How whisper.cpp compares
whisper.cpp alongside other open-source audio, music & voice tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Whisper | ★ 109k | OpenAI's speech recognition model that transcribes and translates audio across many languages. |
| GPT-SoVITS | ★ 61.7k | An open-source WebUI that clones a voice from a short audio sample and turns text into speech, with zero-shot and few-shot fine-tuning. |
| VibeVoice | ★ 54.2k | Microsoft's text-to-speech model for generating long, expressive multi-speaker audio like podcasts. |
| whisper.cpp | ★ 53.6k | Whisper speech recognition as plain C/C++, with no dependencies |
| Voicebox | ★ 53k | Local-first voice studio that clones a voice from a short sample, generates speech across seven TTS engines and 23 languages, handles system-wide dictation, and speaks for agents over MCP. |
| Coqui TTS | ★ 46k | A library of text-to-speech models including the multilingual XTTS voice-cloning model. |
| ChatTTS | ★ 39.8k | ChatTTS is an open-source text-to-speech model tuned for dialogue, with multi-speaker support and fine-grained control over laughter, pauses, and prosody. |
| OpenVoice | ★ 37.5k | OpenVoice clones a voice from a short reference clip and speaks in multiple languages, with control over emotion, accent, rhythm, and intonation. |