一、关于 whisper.cpp
1、项目概览
whisper.cpp 是 OpenAI Whisper 自动语音识别 (ASR) 模型的高性能推理实现,具有以下技术特性:
- 纯 C/C++ 实现,无外部依赖
- 针对 Apple Silicon 优化(ARM NEON/Accelerate/Metal/Core ML)
- 支持 x86 架构的 AVX 指令集
- 支持 POWER 架构的 VSX 指令集
- 混合 F16/F32 精度
- 支持整数量化
- 运行时零内存分配
- 支持 Vulkan/NVIDIA GPU 加速
- 支持 CPU-only 推理
- 提供 C 风格 API
- 支持语音活动检测 (VAD)
2、相关链接资源
- GitHub 仓库:https://github.com/ggml-org/whisper.cpp
- 官方文档:https://github.com/ggml-org/whisper.cpp/blob/master/README.md
- 模型下载:https://huggingface.co/ggerganov/whisper.cpp
- 演示视频:
- 许可证:MIT
3、功能特性
- 多平台支持
- Mac OS (Intel/Apple Silicon)
- iOS/Android
- Linux/Windows/FreeBSD
- WebAssembly/Raspberry Pi
- 硬件加速支持
- Apple Neural Engine (Core ML)
- NVIDIA CUDA
- Vulkan 跨平台 GPU 加速
- OpenBLAS CPU 加速
- Ascend NPU 支持
- 高级功能
- 实时音频输入处理
- 置信度颜色标注
- 词级时间戳
- 说话人分离
- 卡拉 OK 式视频生成
二、安装配置
git https://github.com/ggml-org/whisper.cpp.git
whisper.cpp
sh ./models/download-ggml-model.sh base.en
cmake -B build
cmake --build build --config Release

