ggml-org/whisper.cpp

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

What it solves

whisper.cpp 提供了 OpenAI Whisper 自动语音识别(ASR)模型的高性能、轻量化实现。它让用户能够完全离线、在设备上运行语音转文字转录,去除对繁重依赖或云端 API 的需求。

How it works

项目使用纯 C/C++ 编写,并利用 ggml 机器学习库进行推理。它支持广泛的硬件加速以最大化速度,包括 Apple Silicon(通过 Metal 与 Core ML)、NVIDIA GPU(通过 CUDA)、AMD GPU(通过 ROCm)、Vulkan、OpenVINO,以及各种 CPU Intrinsics(AVX、NEON、VSX)。

Who it’s for

开发者和用户,想要在 iOS、Android、Windows、Linux、macOS 与 WebAssembly 等多平台上集成高质量语音识别,而不依赖外部服务器。

Highlights

  • Zero runtime memory allocations: Optimized for efficiency and speed.
  • Broad hardware support: Native acceleration for almost all major GPU and NPU architectures.
  • Integer quantization: Reduces memory and disk footprint for smaller devices.
  • Cross-platform: Runs on everything from high-end GPUs to Raspberry Pi and mobile phones.
  • Real-time capabilities: Includes examples for continuous microphone input transcription.