Skip to content
FossShelf
Home / Categories / For AI Engineers

Whisper.cpp

Local Whisper inference in C/C++ with zero runtime allocations.

Replaces Openai Whisper Api, Deepgram, Assemblyai, Google Cloud Speech To Text, Speechmatics

55.25K starsMITlast commit 13 Nov 2026
Screenshot of Whisper.cpp

Who it's for

Backend developers building transcription pipelines

The C-style API and CMake build system integrate into existing C, C++, Java, or Python services via language bindings. The async batch pattern fits queue-based architectures where audio files are uploaded and transcribed without blocking request threads, and zero runtime allocations keep latency predictable under load.

If your audio volume is under a few hours per month and latency is critical, the managed OpenAI Whisper API may be simpler to operate than maintaining a self-hosted inference server.

Mobile developers adding on-device speech recognition

iOS and Android examples ship in the repository (whisper.objc and whisper.android). Core ML on Apple Silicon enables on-device inference without a network call, avoiding app store privacy disclosures and working fully offline. The tiny and base models fit within mobile memory budgets.

Skip if your app targets low-end Android devices with under 2 GB RAM; the minimum usable model (tiny, ~273 MB) still needs enough headroom for the OS and app alongside it.

Teams processing sensitive or regulated audio

Medical transcription, legal recordings, and internal corporate calls that cannot leave a private network benefit from local inference. Whisper.cpp runs on a standard Linux server with no outbound API calls, satisfying data-residency or air-gap requirements that cloud ASR APIs cannot meet.

If your compliance regime does not restrict audio leaving your network and you need high accuracy with minimal ops overhead, a managed service like AssemblyAI or Deepgram is faster to deploy.

Developers cutting API costs at high transcription volume

At significant audio volume, per-minute API fees for Deepgram, AssemblyAI, or Google Cloud Speech-to-Text become a recurring cost. Running the medium or large model on a GPU server eliminates per-use fees entirely once the server is provisioned, with inference costs determined only by hardware.

If your monthly transcription volume is small enough that API fees are negligible, the operational overhead of self-hosting may outweigh the savings.

The problem

Sending audio to a commercial speech-to-text API creates two compounding issues. The OpenAI Whisper API, Deepgram, AssemblyAI, and Google Cloud Speech-to-Text all charge per minute of audio, adding a recurring cost that grows with transcription volume. For applications that process meeting recordings, podcasts, call center audio, or continuous voice streams, those fees become a significant line item. The deeper challenge is data control. Any audio sent to a third-party API leaves your infrastructure, which is a non-starter for medical recordings, legal proceedings, private conversations, and internal corporate audio. Offline or air-gapped environments are incompatible with cloud APIs. A local model is the only option, but the original Python-based OpenAI Whisper requires a Python environment with several dependencies and can be slow to run on CPU.

How it works

Zero-dependency C/C++ implementation

The entire model runs in a single C++ file (whisper.cpp) and header (whisper.h) built on the ggml library, with no third-party runtime dependencies. CMake builds produce a binary you can embed directly via the C-style API without pulling in external packages.

Multi-GPU acceleration across vendors

GPU backends cover NVIDIA via cuBLAS and CUDA, AMD via ROCm and HIP, Intel via OpenVINO, and cross-vendor hardware via Vulkan. AMD Ryzen AI NPU and Ascend NPU are also supported. Each backend is a compile-time flag (for example, -DGGML_CUDA=1), so you build only what your hardware needs.

Integer quantization for low-memory hardware

Models can be quantized (for example, Q5_0) to reduce disk size and memory footprint. The base.en model is 142 MiB on disk and uses about 388 MB of memory; quantization can cut that further for Raspberry Pi or edge deployments where the full weights are impractical.

Apple Silicon acceleration via Metal and Core ML

On Apple Silicon, the encoder runs on the GPU via Metal or on the Apple Neural Engine via Core ML. Core ML delivers more than 3x speedup compared with CPU-only inference. ANEForge support enables direct ANE dispatch, which runs about 2x faster than Core ML for the tiny-to-medium model range.

Built-in Voice Activity Detection

VAD skips silent segments before inference, which reduces processing time and prevents the blank-output hallucination that occurs on silent audio. This makes Whisper.cpp practical for real-time or near-real-time pipelines where the audio stream arrives as a continuous feed rather than pre-segmented clips.

Seven model sizes for different hardware

Variants run from tiny (75 MiB disk, ~273 MB memory) to large (2.9 GiB disk, ~3.9 GB memory). A download script fetches any variant in ggml format. English-only and multilingual editions are available at every size, letting you trade accuracy against memory budget.

Features

  • Zero-dependency C/C++ implementation
  • Multi-GPU acceleration across vendors
  • Integer quantization for low-memory hardware
  • Apple Silicon acceleration via Metal and Core ML
  • Built-in Voice Activity Detection
  • Seven model sizes for different hardware

How to install

Download the latest release for your platform from GitHub Releases: https://github.com/ggml-org/whisper.cpp/releases/latest

Recommended for this setup

Strengths

  • MIT license with no API usage fees: The codebase is MIT licensed, so you can run it on your own hardware, modify the source, and ship it in commercial products without licensing fees. Compared with the OpenAI Whisper API (charged per audio minute) or Deepgram (pay-as-you-go or subscription), the cost per transcription minute is just your server's compute.
  • Fully offline: no audio leaves your infrastructure: Every transcription runs locally. Audio never touches a third-party server, which satisfies data-residency requirements, HIPAA-adjacent compliance needs, and use cases in air-gapped environments. The original Python Whisper model also runs offline, but the C/C++ port removes the Python environment requirement entirely.
  • Zero runtime memory allocations: The implementation pre-allocates all buffers at model load time and makes no heap allocations during inference. This reduces latency variance and makes Whisper.cpp suitable for latency-sensitive or embedded deployments where allocation pauses during transcription are a concern.
  • 54,810 stars and active development as of late 2026: With 54,810 GitHub stars, 6,258 forks, and the last push on 2026-10-30, the project is actively maintained under the ggml-org organization. GPU backends, NPU support, and new hardware integrations continue to be added with each release cycle.

Trade-offs

  • Documented quick-start path is a source build: The README's Quick Start walks through a CMake build from source, requiring a C++ compiler and CMake on the target machine. Teams not already familiar with C++ toolchains need to set up a build environment before running their first transcription. This adds a step not present with managed cloud APIs, where a single API key gets you transcribing immediately.
  • Large models require significant RAM: The large model needs about 3.9 GB of RAM and 2.9 GiB of disk space. On machines with 4 GB total RAM, only the small or base models are practical. Quantization reduces memory use, but higher accuracy still correlates with higher memory requirements, and very constrained hardware limits which model sizes are usable.

Tech stack

Languages
C++, C, Cuda, Metal, GLSL, CMake, WGSL, Go Template, Shell, Python, Objective-C, Ruby, Go, Java, Makefile, Dockerfile, Batchfile, PowerShell, Objective-C++, Linker Script, JavaScript, Assembly
Frameworks
—
Databases
—
Tooling
—

FAQ

Is Whisper.cpp the same model as OpenAI's Whisper?

Yes. Whisper.cpp is a C/C++ reimplementation that uses the same model weights published by OpenAI. You download the official Whisper models converted to ggml format; the inference logic is rewritten in C/C++ for performance and portability, but the underlying transformer architecture and weights are identical to what the OpenAI API uses.

Does Whisper.cpp require a GPU to run?

No. CPU-only inference is fully supported on all platforms. A GPU accelerates inference significantly, especially for larger models, but the tiny and base models run at practical speeds on a modern CPU. On Apple Silicon, Metal or Core ML acceleration is available without a discrete GPU, and these deliver meaningful speedups over CPU-only inference.

What audio formats does Whisper.cpp accept?

The whisper-cli tool currently requires 16-bit WAV files sampled at 16,000 Hz. Other formats need conversion first. The README documents using ffmpeg for this: ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le output.wav. Converting your audio before passing it to whisper-cli is the documented workflow for non-WAV sources.

Can Whisper.cpp run on a Raspberry Pi?

Yes. Raspberry Pi is an officially supported platform listed in the README. The tiny model (75 MiB disk, ~273 MB RAM) is practical on a Raspberry Pi 4 with 4 GB RAM. Expect slower-than-realtime transcription without hardware acceleration, but the model runs to completion and the quantized variants reduce the memory footprint further.

How do I choose between the Whisper model sizes?

The tiny and base models are fast and low-memory but less accurate on accented speech, background noise, or non-English audio. The medium and large models are more accurate but require 2 GB or more of RAM and take longer per audio minute. For most English-language transcription with clear audio, the base or small model is a reasonable starting point; switch to medium or large when accuracy on difficult audio matters more than throughput.

Similar tools

More in AI Engineers