ggml-org /whisper.cpp

Port of OpenAI's Whisper model in C/C++

★ 55,058⑂ 6,295👁 398⑃ 1,554● 2,004▤ 45◈ 539
C++MITCreated 2022-09-25
55,058
stars
+23+190+906
6,295
forks
398
watchers
1,554
prs
2,004
issues
45
releases
539
discussions

README

whisper.cpp



!whisper.cpp









High-performance inference of OpenAI's Whisper automatic speech recognition (ASR) model:

- Plain C/C++ implementation without dependencies
- Apple Silicon first-class citizen - optimized via ARM NEON, Accelerate framework, Metal and Core ML
- AVX intrinsics support for x86 architectures
- VSX intrinsics support for POWER architectures
- Mixed F16 / F32 precision
- Integer quantization support
- Zero memory allocations at runtime
- Vulkan support
- Support for CPU-only inference
- Efficient GPU support for NVIDIA
- AMD ROCm GPU support
- AMD Ryzen AI NPU Support
- OpenVINO Support
- Huawei Ascend NPU Support
- Moore Threads GPU Support
- C-style API
- Voice Activity Detection (VAD)

Supported platforms:

- [x] Mac OS (Intel and Arm)
- [x] iOS
- [x] Android
- [x] Java
- [x] Linux / FreeBSD
- [x] WebAssembly
- [x] Windows (MSVC and MinGW)
- [x] Raspberry Pi
- [x] Docker

The entire high-level implementation of the model is contained in whisper.h and whisper.cpp.
The rest of the code is part of the ggml machine learning library.

Having such a lightweight implementation of the model allows to easily integrate it in different platforms and applications.
As an example, here is a video of running the model on an iPhone 13 device - fully offline, on-device: whisper.objc

https://user-images.githubusercontent.com/1991296/197385372-962a6dea-bca1-4d50-bf96-1d8c27b98c81.mp4

You can also easily make your own offline voice assistant application: command

https://user-images.githubusercontent.com/1991296/204038393-2f846eae-c255-4099-a76d-5735c25c49da.mp4

On Apple Silicon, the inference runs fully on the GPU via Metal:

https://github.com/ggml-org/whisper.cpp/assets/1991296/c82e8f86-60dc-49f2-b048-d2fdbd6b5225

 Quick start

First clone the repository:

bash
git clone https://github.com/ggml-org/whisper.cpp.git


Navigate into the directory:


cd whisper.cpp


Then, download one of the Whisper models converted in ggml format. For example:

bash
sh ./models/download-ggml-model.sh base.en


Now build the whisper-cli example and transcribe an audio file like this:

bash
 build the project
cmake -B build
cmake --build build -j --config Release

 transcribe an audio file
./build/bin/whisper-cli -f samples/jfk.wav


---

For a quick demo, simply run make base.en.

The command downloads the base.en model converted to custom ggml format and runs the inference on all .wav samples in the folder samples.

For detailed usage instructions, run: ./build/bin/whisper-cli -h

Note that the whisper-cli example currently runs only with 16-bit WAV files, so make sure to convert your input before running the tool.
For example, you can use ffmpeg like this:

bash
ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le output.wav


 More audio samples

If you want some extra audio samples to play with, simply run:


make -j samples


This will download a few more audio files from Wikipedia and convert them to 16-bit WAV format via ffmpeg.

You can do

Top issues

Discussions

Latest release

v1.9.5 v1.9.5 2026-10-06
Overview

Maintenance release. Updates to ggml v0.26.0.

Nightly build: b5454
More info: dist : releases and versioning of ggml-org projects

 Changelog since v1.9.4

d1be6fde whisper : bump version to 1.9.5 (4102)
4afec37b talk-llama : update llama.cpp to v0.6.0
3d451abe sync : ggml
47f1c7dc ggml : bump version to 0.26.0 (ggml/1652)
e71b7844 CUDA: make the alloc_deps check batch independent (llama/29986)
cdc87302 vulkan: fix Flash Attention shmem write out of bounds (llama/29988)
563a9f7a vulkan: revert mul_mat_id tile selection PR 29182 (llama/29936)
ebb8a170 cuda: use the ve

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON