
whisper.cpp
Fast C/C++ port of OpenAI's Whisper speech-to-text model, runs locally on CPU or GPU.
- Stars
- 54.9k
- Forks
- 6.3k
- Licence
- MIT
- Language
- C++
- Last update
- 7 days ago
- Type
- Library
What it is
whisper.cpp is a C/C++ implementation of OpenAI's Whisper automatic speech recognition model, which turns spoken audio into text. It is written to run with no external dependencies and can work offline on the device. People use it to add transcription to their own apps or to transcribe audio on their own machine without sending it to a cloud service.
- Transcribe a WAV file from the command line with whisper-cli
- Convert an MP3 to 16-bit 16 kHz WAV with ffmpeg and transcribe it offline
- Quantize a model to a smaller format such as q5_0 to reduce memory and disk use
- Build an offline voice assistant using the command example described in the README
Great for
- Developers who want to embed offline speech-to-text in a C, C++, or other native app
- People on Apple Silicon who want GPU or Neural Engine accelerated transcription
- Users who need to transcribe audio privately on their own computer
- Projects targeting constrained or embedded hardware such as Raspberry Pi
Not ideal for
- Non-technical users who want a ready-made app with a graphical interface, since the README centers on command-line usage and building from source
- Anyone who needs audio in formats other than 16-bit WAV without first converting it, because the CLI example only accepts 16-bit WAV
- Teams needing a hosted transcription API, since this is a local inference library rather than a service
How to get it
- 1
Clone and build from source
You'll need: git · CMake · A C/C++ compiler · ffmpeg (optional, for converting audio to WAV)
Clone the repository
git clone https://github.com/ggml-org/whisper.cpp.gitDownload the base.en model
sh ./models/download-ggml-model.sh base.enConfigure the build with CMake
cmake -B buildBuild the project
cmake --build build -j --config Release - 2
Run it
- Clone the repository and move into the whisper.cpp folder
- Download the base.en model with the provided script
- Build with CMake as shown in the README
- Run ./build/bin/whisper-cli -f samples/jfk.wav to transcribe the sample file
- 3
Get the most out of it
- Use ./build/bin/whisper-cli -h to see detailed usage options
- Quantize models with the quantize tool to save memory and disk space
- Enable Core ML on Apple Silicon for faster encoder inference, as described in the Core ML section
- Use the -DGGML_BLAS=1 build option on POWER systems with a BLAS package installed
- Convert input audio to 16 kHz mono 16-bit WAV with ffmpeg before transcribing
Downloads
Strengths
- No external dependencies in the core implementation, which eases integration into many platforms
- Supports a wide range of hardware including CPU, Metal, CUDA-based NVIDIA GPUs, Vulkan, and Core ML
- Includes quantization options that reduce model size and memory use
Trade-offs
- Command-line example only accepts 16-bit WAV, so audio often needs conversion first
- Building and choosing models requires comfort with CMake and the terminal
- Core ML and some accelerator paths require extra setup and platform-specific steps
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| whisper.cpp (this) | 54.9k | Library | intermediate | 7 days ago | Developers who want to embed offline speech-to-text in a C, C++, or other native app |
| faster-whisper | 26.4k | Library | intermediate | 5 days ago | Python developers who need to add speech-to-text to an application |
| whisper | 112k | AI model / agent | intermediate | 2 months ago | Developers who want to add transcription of audio files to a Python project |
| openwhispr | 10.5k | App | beginner | 4 days ago | People who want dictation in any app without sending audio to a cloud service |
| nano-vllm | 16.3k | Library | intermediate | 6 months ago | Developers who want to understand how LLM inference engines work internally |
| FunASR | 20.9k | Library | intermediate | 4 days ago | Developers who want to transcribe audio in Python with a pretrained model |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.