能力标签
Whisper 语音转文字
🛠
AI工具

Whisper 语音转文字

基于 Python · 开源免费,本地部署,数据完全自主可控
英文名:Whisper
⭐ 72.0k Stars 💻 Python 📄 MIT 🏷 AI 9.2分
9.2AI 综合评分
语音识别字幕生成转录工具多语言开源模型
✦ AI Skill Hub 推荐

经 AI Skill Hub 精选评估,Whisper 语音转文字 获评「强烈推荐」。在 GitHub 上收获超过 72.0k 颗 Star,这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 9.2 分,适合有一定技术背景的用户使用。

📚 深度解析
OpenAI Whisper 是目前开源语音识别(Automatic Speech Recognition,ASR)领域公认的标杆级工具。它通过在 68 万小时的多语言音频数据上进行大规模弱监督训练,实现了接近商业级的识别精度,能够处理包括中文、英文、日文、法文、西班牙文在内的 99 种语言。Whisper 不仅支持语音转文字,还内置语言自动检测和语音翻译为英文的功能,是构建语音处理工作流的核心组件。

**模型选型指南**
Whisper 提供六种规格的预训练模型,选型时需要平衡精度、速度和显存需求:
- tiny / base:参数量小(39M/74M),速度极快,适合实时转录或低配设备,中文精度较低
- small(244M):速度与精度的入门平衡点,适合普通话识别
- medium(769M):**大多数用户的推荐选择**,在 CPU 上也能接受,中文识别准确率高
- large-v3(1550M):目前最高精度版本,需要 10GB 以上 GPU 显存,适合字幕制作等高精度场景

**中文语音识别实践**
Whisper 对普通话的识别效果出色,large-v3 模型在标准普通话上的字错率(CER)可以控制在 5% 以内。使用时建议加上 --language zh 参数明确指定语言,避免模型在语言检测阶段浪费时间。输出格式支持 txt、srt(字幕文件)、vtt、tsv、json 等多种格式,--output-format srt 可以直接生成字幕文件。

**Whisper vs faster-whisper**
原版 Whisper 是基于 PyTorch 的实现,速度相对较慢。faster-whisper 是基于 CTranslate2 重写的优化版本,在相同精度下推理速度提升 4-8 倍,显存占用降低约 50%。对于追求速度的生产环境,**AI Skill Hub 推荐优先考虑 faster-whisper**。此外,WhisperX 支持词级时间戳对齐,适合需要精确字幕定位的场景。

**典型工作流**
字幕制作:video.mp4 → whisper → output.srt → 视频剪辑软件导入。结合 auto-subtitle 工具可以将上述流程压缩为一条命令,自动完成"音频提取→转录→字幕烧录"全流程。会议记录场景:将录音文件批量放入目录,通过脚本调用 Whisper API 批处理,输出 txt 格式,再由 GPT/Claude 进行整理和摘要。

**注意事项**
Whisper 是批处理工具,不支持低延迟实时识别。如需实时字幕(<500ms 延迟),应考虑 OpenAI Realtime API 或 RealtimeSTT 等专门解决方案。
📋 工具概览

OpenAI开源的先进语音识别模型,能自动生成视频字幕和转录文本,支持99种语言。适合内容创作者、媒体工作者、研究人员等需要快速转录音视频的用户,具有识别准确率高、多语言支持强的优势。

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

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

OpenAI开源的先进语音识别模型,能自动生成视频字幕和转录文本,支持99种语言。适合内容创作者、媒体工作者、研究人员等需要快速转录音视频的用户,具有识别准确率高、多语言支持强的优势。

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

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

# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install whisper

# 方式三:从源码安装(获取最新功能)
git clone https://github.com/openai/whisper
cd whisper
pip install -e .

# 验证安装
python -c "import whisper; print('安装成功')"
📋 安装步骤说明
  1. 访问 GitHub 仓库页面
  2. 按照 README 文档完成依赖安装
  3. 根据系统环境完成初始化配置
  4. 参考官方示例或文档开始使用
  5. 遇到问题可在 GitHub Issues 中查找解答
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 基本转录(自动检测语言)
whisper audio.mp3

# 指定中文,输出 SRT 字幕
whisper video.mp4 --language Chinese --task transcribe --output_format srt

# 使用 large 模型提升准确率
whisper audio.mp3 --model large

# 翻译为英文字幕
whisper audio.mp3 --task translate --output_format srt

# 批量转录目录下所有音频
whisper *.mp3 --language Chinese --output_format srt
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# whisper 配置文件示例(config.yml)
app:
  name: "whisper"
  debug: false
  log_level: "INFO"

# 运行时指定配置文件
whisper --config config.yml

# 或通过环境变量配置
export WHISPER_API_KEY="your-key"
export WHISPER_OUTPUT_DIR="./output"
📑 README 深度解析 真实文档 完整度 32/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

Whisper

[[Blog]](https://openai.com/blog/whisper) [[Paper]](https://arxiv.org/abs/2212.04356) [[Model card]](https://github.com/openai/whisper/blob/main/model-card.md) [[Colab example]](https://colab.research.google.com/github/openai/whisper/blob/master/notebooks/LibriSpeech.ipynb)

Whisper is a general-purpose speech recognition model. It is trained on a large dataset of diverse audio and is also a multitasking model that can perform multilingual speech recognition, speech translation, and language identification.

Setup

We used Python 3.9.9 and PyTorch 1.10.1 to train and test our models, but the codebase is expected to be compatible with Python 3.8-3.11 and recent PyTorch versions. The codebase also depends on a few Python packages, most notably OpenAI's tiktoken for their fast tokenizer implementation. You can download and install (or update to) the latest release of Whisper with the following command:

pip install -U openai-whisper

Alternatively, the following command will pull and install the latest commit from this repository, along with its Python dependencies:

pip install git+https://github.com/openai/whisper.git

To update the package to the latest version of this repository, please run:

pip install --upgrade --no-deps --force-reinstall git+https://github.com/openai/whisper.git

It also requires the command-line tool ffmpeg to be installed on your system, which is available from most package managers:

```bash

Command-line usage

The following command will transcribe speech in audio files, using the turbo model:

whisper audio.flac audio.mp3 audio.wav --model turbo

The default setting (which selects the turbo model) works well for transcribing English. However, the turbo model is not trained for translation tasks. If you need to translate non-English speech into English, use one of the multilingual models (tiny, base, small, medium, large) instead of turbo.

For example, to transcribe an audio file containing non-English speech, you can specify the language:

whisper japanese.wav --language Japanese

To translate speech into English, use:

whisper japanese.wav --model medium --language Japanese --task translate
Note: The turbo model will return the original language even if --task translate is specified. Use medium or large for the best translation results.

Run the following to view all available options:

whisper --help

See tokenizer.py for the list of all available languages.

Python usage

Transcription can also be performed within Python:

import whisper

model = whisper.load_model("turbo")
result = model.transcribe("audio.mp3")
print(result["text"])

Internally, the transcribe() method reads the entire file and processes the audio with a sliding 30-second window, performing autoregressive sequence-to-sequence predictions on each window.

Below is an example usage of whisper.detect_language() and whisper.decode() which provide lower-level access to the model.

```python import whisper

model = whisper.load_model("turbo")

More examples

Please use the 🙌 Show and tell category in Discussions for sharing more example usages of Whisper and third-party extensions such as web demos, integrations with other tools, ports for different platforms, etc.

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

OpenAI顶级开源项目,语音识别准确度业界领先,多语言支持完整,活跃维护,是实际生产环境的优选方案。

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

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

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

📄 License 说明

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

🔗 相关工具推荐
📚 相关教程推荐
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合
❓ 常见问题 FAQ
支持mp3、wav、m4a、flac等主流音频格式和视频文件。
💡 AI Skill Hub 点评

AI Skill Hub 点评:Whisper 语音转文字 的核心功能完整,质量优秀。对于AI 技术爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。

📚 深入学习 Whisper 语音转文字
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 Whisper
原始描述 OpenAI 开源语音识别模型,自动生成视频字幕和转录文本,支持中英多语言
Topics 语音识别字幕生成转录工具多语言开源模型
GitHub https://github.com/openai/whisper
License MIT
语言 Python
🔗 原始来源
🐙 GitHub 仓库  https://github.com/openai/whisper 🌐 官方网站  https://github.com/openai/whisper

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