能力标签
🛠
AI工具

Whisper语音识别引擎

基于 C++ · 开源免费,本地部署,数据完全自主可控
英文名:whisper-cpp
⭐ 49.7k Stars 🍴 5.5k Forks 💻 C++ 📄 MIT 🏷 AI 8.8分
8.8AI 综合评分
语音识别语音转文字C++离线推理边缘计算
✦ AI Skill Hub 推荐

AI Skill Hub 强烈推荐:Whisper语音识别引擎 是一款优质的AI工具。在 GitHub 上收获超过 49.7k 颗 Star,AI 综合评分 8.8 分,在同类工具中表现稳健。如果你正在寻找可靠的AI工具解决方案,这是一个值得深入了解的选择。

📚 深度解析
Whisper语音识别引擎 是一款基于 C++ 的开源工具,在 GitHub 上收获 50k+ Star,是语音识别、语音转文字、C++、离线推理领域中的优质开源项目。开源工具的最大优势在于代码完全透明,你可以审计每一行代码的安全性,也可以根据自身需求进行二次开发和定制。

**为什么要使用开源工具而非商业 SaaS?**
对于个人开发者和有隐私需求的用户,本地部署的开源工具意味着数据不离本机,不受第三方服务商的数据政策约束。同时,开源工具通常没有使用次数限制和月度费用,一次安装即可长期使用,对于高频使用场景的总拥有成本(TCO)远低于订阅制商业工具。

**安装与环境准备**
Whisper语音识别引擎 依赖 C++ 运行环境。建议通过 pyenv(Python)或 nvm(Node.js)管理 C++ 版本,避免全局环境污染。对于新手用户,推荐先创建虚拟环境(python -m venv venv && source venv/bin/activate),再安装依赖,这样即使出现问题也可以随时删除虚拟环境重新开始,不影响系统稳定性。

**社区与维护**
GitHub Issue 和 Discussion 是获取帮助的最快渠道。在提问前建议先检查 Closed Issues(已关闭的问题),大多数常见问题都已有解答。遇到 Bug 时,提供 pip list 的输出、完整错误堆栈和最小可复现示例,能显著提高开发者响应速度。AI Skill Hub 将持续追踪 Whisper语音识别引擎 的版本更新,及时通知重要功能变化。
📋 工具概览

OpenAI Whisper模型的C/C++高性能实现,专为离线语音转文字优化。支持多语言识别,资源占用小,适合开发者集成到应用中或部署在边缘设备上。

Whisper语音识别引擎 是一款基于 C++ 开发的开源工具,专注于 语音识别、语音转文字、C++ 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

GitHub Stars
⭐ 49.7k
开发语言
C++
支持平台
Windows / macOS / Linux
维护状态
活跃维护,更新频繁
开源协议
MIT
AI 综合评分
8.8 分
工具类型
AI工具
Forks
5.5k
📖 中文文档
以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

OpenAI Whisper模型的C/C++高性能实现,专为离线语音转文字优化。支持多语言识别,资源占用小,适合开发者集成到应用中或部署在边缘设备上。

Whisper语音识别引擎 是一款基于 C++ 开发的开源工具,专注于 语音识别、语音转文字、C++ 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

📌 核心特色
  • 开源免费,支持本地部署,数据完全自主可控
  • 活跃的 GitHub 开源社区,持续迭代更新
  • 提供详细文档和使用示例,新手友好
  • 支持自定义配置,灵活适配不同使用环境
  • 可作为基础组件集成进现有技术栈或进行二次开发
🎯 主要使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 克隆仓库
git clone https://github.com/ggml-org/whisper.cpp
cd whisper.cpp

# 查看安装说明
cat README.md

# 按 README 完成环境依赖安装后即可使用
📋 安装步骤说明
  1. 访问 GitHub 仓库页面
  2. 按照 README 文档完成依赖安装
  3. 根据系统环境完成初始化配置
  4. 参考官方示例或文档开始使用
  5. 遇到问题可在 GitHub Issues 中查找解答
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 查看帮助
whisper.cpp --help

# 基本运行
whisper.cpp [options] <input>

# 详细使用说明请查阅文档
# https://github.com/ggml-org/whisper.cpp
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# whisper.cpp 配置说明
# 查看配置选项
whisper.cpp --config-example > config.yml

# 常见配置项
# output_dir: ./output
# log_level: info
# workers: 4

# 环境变量(覆盖配置文件)
export WHISPER.CPP_CONFIG="/path/to/config.yml"
📑 README 深度解析 真实文档 完整度 60/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

whisper.cpp

whisper.cpp

Actions Status License: MIT Conan Center npm

Stable: v1.8.1 / Roadmap

High-performance inference of OpenAI's Whisper automatic speech recognition (ASR) model:

Supported platforms:

The entire high-level implementation of the model is contained in whisper.h and whisper.cpp. The rest of the code is part of the ggml machine learning library.

Having such a lightweight implementation of the model allows to easily integrate it in different platforms and applications. As an example, here is a video of running the model on an iPhone 13 device - fully offline, on-device: whisper.objc

https://user-images.githubusercontent.com/1991296/197385372-962a6dea-bca1-4d50-bf96-1d8c27b98c81.mp4

You can also easily make your own offline voice assistant application: command

https://user-images.githubusercontent.com/1991296/204038393-2f846eae-c255-4099-a76d-5735c25c49da.mp4

On Apple Silicon, the inference runs fully on the GPU via Metal:

https://github.com/ggml-org/whisper.cpp/assets/1991296/c82e8f86-60dc-49f2-b048-d2fdbd6b5225

Prerequisites

  • Docker must be installed and running on your system.
  • Create a folder to store big models & intermediate files (ex. /whisper/models)

build the project

cmake -B build cmake --build build -j --config Release

build with GGML_BLAS defined

cmake -B build -DGGML_BLAS=1 cmake --build build -j --config Release ./build/bin/whisper-cli [ .. etc .. ] ```

Docker

Installing with Conan

You can install pre-built binaries for whisper.cpp or build it from source using Conan. Use the following command:

conan install --requires="whisper-cpp/[*]" --build=missing

For detailed instructions on how to use Conan, please refer to the Conan documentation.

Quick start

First clone the repository:

git clone https://github.com/ggml-org/whisper.cpp.git

Navigate into the directory:

cd whisper.cpp

Then, download one of the Whisper models converted in ggml format. For example:

sh ./models/download-ggml-model.sh base.en

Now build the whisper-cli example and transcribe an audio file like this:

```bash

Memory usage

ModelDiskMem
tiny75 MiB~273 MB
base142 MiB~388 MB
small466 MiB~852 MB
medium1.5 GiB~2.1 GB
large2.9 GiB~3.9 GB

run the examples as usual, specifying the quantized model file

./build/bin/whisper-cli -m models/ggml-base.en-q5_0.bin ./samples/gb0.wav ```

Usage

```shell

Real-time audio input example

This is a naive example of performing real-time inference on audio from your microphone. The stream tool samples the audio every half a second and runs the transcription continuously. More info is available in issue #10. You will need to have sdl2 installed for it to work properly.

cmake -B build -DWHISPER_SDL2=ON
cmake --build build -j --config Release
./build/bin/whisper-stream -m ./models/ggml-base.en.bin -t 8 --step 500 --length 5000

https://user-images.githubusercontent.com/1991296/194935793-76afede7-cfa8-48d8-a80f-28ba83be7d09.mp4

Examples

There are various examples of using the library for different projects in the examples folder. Some of the examples are even ported to run in the browser using WebAssembly. Check them out!

ExampleWebDescription
[whisper-cli](examples/cli)[whisper.wasm](examples/whisper.wasm)Tool for translating and transcribing audio using Whisper
[whisper-bench](examples/bench)[bench.wasm](examples/bench.wasm)Benchmark the performance of Whisper on your machine
[whisper-stream](examples/stream)[stream.wasm](examples/stream.wasm)Real-time transcription of raw microphone capture
[whisper-command](examples/command)[command.wasm](examples/command.wasm)Basic voice assistant example for receiving voice commands from the mic
[whisper-server](examples/server)HTTP transcription server with OAI-like API
[whisper-talk-llama](examples/talk-llama)Talk with a LLaMA bot
[whisper.objc](examples/whisper.objc)iOS mobile application using whisper.cpp
[whisper.swiftui](examples/whisper.swiftui)SwiftUI iOS / macOS application using whisper.cpp
[whisper.android](examples/whisper.android)Android mobile application using whisper.cpp
[whisper.nvim](examples/whisper.nvim)Speech-to-text plugin for Neovim
[generate-karaoke.sh](examples/generate-karaoke.sh)Helper script to easily [generate a karaoke video](https://youtu.be/uj7hVta4blM) of raw audio capture
[livestream.sh](examples/livestream.sh)[Livestream audio transcription](https://github.com/ggml-org/whisper.cpp/issues/185)
[yt-wsp.sh](examples/yt-wsp.sh)Download + transcribe and/or translate any VOD [(original)](https://gist.github.com/DaniruKun/96f763ec1a037cc92fe1a059b643b818)
[wchess](examples/wchess)[wchess.wasm](examples/wchess)Voice-controlled chess

More audio samples

If you want some extra audio samples to play with, simply run:

make -j samples

This will download a few more audio files from Wikipedia and convert them to 16-bit WAV format via ffmpeg.

You can download and run the other models as follows:

make -j tiny.en
make -j tiny
make -j base.en
make -j base
make -j small.en
make -j small
make -j medium.en
make -j medium
make -j large-v1
make -j large-v2
make -j large-v3
make -j large-v3-turbo

transcribe an audio file in samples folder

docker run -it --rm \ -v path/to/models:/models \ whisper.cpp:main "whisper-cli -m /models/ggml-base.bin -f ./samples/jfk.wav"

OpenVINO support

On platforms that support OpenVINO, the Encoder inference can be executed on OpenVINO-supported devices including x86 CPUs and Intel GPUs (integrated & discrete).

This can result in significant speedup in encoder performance. Here are the instructions for generating the OpenVINO model and using it with whisper.cpp:

  • First, setup python virtual env. and install python dependencies. Python 3.10 is recommended.

Windows:

  cd models
  python -m venv openvino_conv_env
  openvino_conv_env\Scripts\activate
  python -m pip install --upgrade pip
  pip install -r requirements-openvino.txt
  

Linux and macOS:

  cd models
  python3 -m venv openvino_conv_env
  source openvino_conv_env/bin/activate
  python -m pip install --upgrade pip
  pip install -r requirements-openvino.txt
  
  • Generate an OpenVINO encoder model. For example, to generate a base.en model, use:
  python convert-whisper-to-openvino.py --model base.en
  

This will produce ggml-base.en-encoder-openvino.xml/.bin IR model files. It's recommended to relocate these to the same folder as ggml models, as that is the default location that the OpenVINO extension will search at runtime.

  • Build whisper.cpp with OpenVINO support:

Download OpenVINO package from release page. The recommended version to use is 2024.6.0. Ready to use Binaries of the required libraries can be found in the OpenVino Archives

After downloading & extracting package onto your development system, set up required environment by sourcing setupvars script. For example:

Linux:

  source /path/to/l_openvino_toolkit_ubuntu22_2023.0.0.10926.b4452d56304_x86_64/setupvars.sh
  

Windows (cmd):

  C:\Path\To\w_openvino_toolkit_windows_2023.0.0.10926.b4452d56304_x86_64\setupvars.bat
  

And then build the project using cmake:

  cmake -B build -DWHISPER_OPENVINO=1
  cmake --build build -j --config Release
  
  • Run the examples as usual. For example:
  $ ./build/bin/whisper-cli -m models/ggml-base.en.bin -f samples/jfk.wav

  ...

  whisper_ctx_init_openvino_encoder: loading OpenVINO model from 'models/ggml-base.en-encoder-openvino.xml'
  whisper_ctx_init_openvino_encoder: first run on a device may take a while ...
  whisper_openvino_init: path_model = models/ggml-base.en-encoder-openvino.xml, device = GPU, cache_dir = models/ggml-base.en-encoder-openvino-cache
  whisper_ctx_init_openvino_encoder: OpenVINO model loaded

  system_info: n_threads = 4 / 8 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | VSX = 0 | COREML = 0 | OPENVINO = 1 |

  ...
  

The first time run on an OpenVINO device is slow, since the OpenVINO framework will compile the IR (Intermediate Representation) model to a device-specific 'blob'. This device-specific blob will get cached for the next run.

For more information about the OpenVINO implementation please refer to PR #1037.

VAD Options

* --vad-threshold: Threshold probability for speech detection. A probability for a speech segment/frame above this threshold will be considered as speech.

* --vad-min-speech-duration-ms: Minimum speech duration in milliseconds. Speech segments shorter than this value will be discarded to filter out brief noise or false positives.

* --vad-min-silence-duration-ms: Minimum silence duration in milliseconds. Silence periods must be at least this long to end a speech segment. Shorter silence periods will be ignored and included as part of the speech.

* --vad-max-speech-duration-s: Maximum speech duration in seconds. Speech segments longer than this will be automatically split into multiple segments at silence points exceeding 98ms to prevent excessively long segments.

* --vad-speech-pad-ms: Speech padding in milliseconds. Adds this amount of padding before and after each detected speech segment to avoid cutting off speech edges.

* --vad-samples-overlap: Amount of audio to extend from each speech segment into the next one, in seconds (e.g., 0.10 = 100ms overlap). This ensures speech isn't cut off abruptly between segments when they're concatenated together.

Video comparison of different models

Use the scripts/bench-wts.sh script to generate a video in the following format:

./scripts/bench-wts.sh samples/jfk.wav
ffplay ./samples/jfk.wav.all.mp4

https://user-images.githubusercontent.com/1991296/223206245-2d36d903-cf8e-4f09-8c3b-eb9f9c39d6fc.mp4

---

🎯 aiskill88 AI 点评 A 级 2026-05-17

业界公认的高质量语音识别方案,C++实现性能优异,社区活跃度高,适合对推理速度和隐私保护有要求的场景。

📚 实用指南(长尾问题)
适合谁
  • 跨境业务、多语言内容运营团队
  • 做语音类 AI 产品的开发者
最佳实践
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
部署方案
  • Docker:whisper-cpp 提供官方镜像,docker compose up 一键启动
  • CLI:直接 npm install -g / pip install,命令行调用
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
whisper-cpp 中文教程whisper-cpp 安装报错怎么办whisper-cpp Docker 部署whisper-cpp 与同类工具对比whisper-cpp 最佳实践whisper-cpp 适合谁用
⚡ 核心功能
👥 适合谁
  • 跨境业务、多语言内容运营团队
  • 做语音类 AI 产品的开发者
⭐ 最佳实践
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
👥 适合人群
AI 技术爱好者研究人员和学生开发者和工程师技术创业者
🎯 使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
⚖️ 优点与不足
✅ 优点
  • +GitHub 49.7k Star,社区高度认可
  • +MIT 协议,可免费商用
  • +完全开源免费,无授权费用
  • +本地部署,数据完全自主可控
  • +开发者社区支持,遇问题可查可问
⚠️ 不足
  • 安装和初始配置可能需要一定技术基础
  • 功能完整性通常不如成熟商业产品
  • 技术支持主要依赖开源社区,响应速度不稳定
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。

🔗 相关工具推荐
📚 相关教程推荐
📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合
❓ 常见问题 FAQ
可以,无需网络连接,完全本地推理。
💡 AI Skill Hub 点评

总体来看,Whisper语音识别引擎 是一款质量优秀的AI工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。

📚 深入学习 Whisper语音识别引擎
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 whisper-cpp
原始描述 开源AI工具:Port of OpenAI's Whisper model in C/C++。⭐49.7k · C++
Topics 语音识别语音转文字C++离线推理边缘计算
GitHub https://github.com/ggml-org/whisper.cpp
License MIT
语言 C++
🔗 原始来源
🐙 GitHub 仓库  https://github.com/ggml-org/whisper.cpp

收录时间:2026-05-14 · 更新时间:2026-05-16 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。