whisper.cpp logo

whisper.cpp

Free

Port of OpenAI's Whisper model in C/C++. #opensource

FreeFree tier
Type
Open Source
Company
ggml-org

About whisper.cpp

whisper.cpp is a high-performance, dependency-free C/C++ implementation of OpenAI's Whisper automatic speech recognition (ASR) model. It runs on multiple platforms including macOS (Apple Silicon and Intel), iOS, Android, Linux, Windows, and Raspberry Pi, with optimized support for ARM NEON, Metal, Core ML, AVX, VSX, Vulkan, and various GPU backends. The library provides zero memory allocations at runtime, mixed F16/F32 precision, integer quantization, and a C-style API for easy integration. It also offers voice activity detection (VAD) and can run entirely offline on devices like the iPhone.

Key Features

Plain C/C++ implementation without external dependencies
Optimized for Apple Silicon via ARM NEON, Accelerate, Metal, and Core ML
AVX intrinsics on x86, VSX intrinsics on POWER architectures
Mixed F16/F32 precision and integer quantization support
Zero memory allocations at runtime
Vulkan, CUDA (NVIDIA), AMD ROCm, OpenVINO, Ascend NPU, and Moore Threads GPU support
Voice Activity Detection (VAD) built-in
C-style API for easy integration
Supports macOS, iOS, Android, Linux, Windows, Raspberry Pi, WebAssembly, and Docker
Offline inference on mobile devices

Pros & Cons

Pros
  • No external dependencies simplifies build and deployment
  • Highly optimized for Apple Silicon and modern x86 CPUs
  • Supports a wide range of hardware accelerators (Metal, CUDA, Vulkan, etc.)
  • Zero memory allocations improves performance and predictability
  • Voice Activity Detection improves accuracy and efficiency
  • Cross-platform: works on desktop, mobile, embedded, and web
  • Open source with permissive license (MIT)
Cons
  • Requires conversion of audio to 16-bit WAV format before input
  • Model download and conversion step needed before first use
  • Command-line interface may be less accessible to non-developers
  • Limited to Whisper model architecture (not a general-purpose ASR framework)

Best For

Real-time speech transcription on edge devicesOffline voice assistant applicationsIntegrating speech recognition into mobile appsServer-side audio transcription with GPU accelerationAutomated meeting note generationAudio content indexing and search

FAQ

What is whisper.cpp?
whisper.cpp is a high-performance, dependency-free C/C++ implementation of OpenAI's Whisper automatic speech recognition model. It runs on multiple platforms and supports various hardware accelerators.
What platforms are supported?
Supported platforms include macOS (Intel and Apple Silicon), iOS, Android, Linux, FreeBSD, Windows (MSVC and MinGW), Raspberry Pi, WebAssembly, and Docker.
How do I get started?
Clone the repository, download a pre-converted Whisper model using the provided script, build the project with CMake, and transcribe an audio file using the whisper-cli tool.
What audio formats are supported?
The whisper-cli example requires 16-bit WAV files. You can convert audio using ffmpeg (e.g., ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le output.wav).
Does it require an internet connection?
No, once the model is downloaded, inference runs entirely offline on the device.
Is GPU acceleration supported?
Yes, it supports GPU acceleration via Metal (Apple), CUDA (NVIDIA), AMD ROCm, Vulkan, OpenVINO, Ascend NPU, and Moore Threads GPU.