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.