OpenAI Whisper CLI
$ whisper 官方出品 低风险OpenAI whisper CLI 基于 PyTorch 与 ffmpeg 在本地完成 99+ 种语言的语音识别,可通过 --output_format json 与 --output_dir 导出 .txt、.srt、.vtt、.tsv 或带时间戳的 .json 文件。
brew install openai-whisper 直接将音视频离线转录为本地 .json 或 .srt 文件,避免将庞大媒体内容送入 LLM 上下文。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
支持输出干净的 --output_format json 文件以及 --verbose False 与 --output_dir,但默认写文件而非向 stdout 打印 JSON。
- Supports
--output_format json|txt|srt|vtt|tsv,--output_dir, and--verbose False
缓存权重后 100% 离线本地处理音频,无任何 API 密钥或云端上传风险。
- Offline local inference; writes transcript artifacts only to
--output_dir
依赖 Python、体积较大的 PyTorch 以及系统 PATH 中的 ffmpeg。
- Requires PyTorch (~2+ GB) and
ffmpegonPATH
多语种识别准确率高且附带分段时间戳,但在 CPU 上运行大模型耗时较长。
- 99+ language ASR with timestamped JSON and SRT/VTT outputs
OpenAI 官方开源仓库(openai/whisper),MIT 协议(代码已趋于稳定)。
- Official
openai/whisperrepository
README 与 --help 参数说明清晰。
- README and
--helpat github.com/openai/whisper
安全边界、鉴权与放权指南
模型权重下载至 ~/.cache/whisper/ 后完全离线推理;无需任何 API 密钥。
免费开源(MIT 协议)本地 Python CLI;依赖 PyTorch 与 ffmpeg。
# Whisper CLI Agent Rules - Always specify `--model` (e.g. `tiny` or `small` for fast CPU runs), `--output_format json`, `--output_dir`, and `--verbose False`. - Ensure `ffmpeg` is installed on `PATH`, and check disk space before pulling `large` (~3 GB) weights.
Agent 高频安全命令配方
只读查询(安全推荐)
whisper --help
列出支持的 --model 规格(tiny、base、small、medium、large、turbo)与导出格式。
受控写入与预演
whisper audio.mp3 --model small --output_format json --output_dir ./transcripts --verbose False
输出 ./transcripts/audio.json 分段时间戳文件,并用 --verbose False 保持 stdout 安静。
核心优势
- + 完全私密离线的语音转文本,原生支持带时间戳的
--output_format json与 SRT/VTT。 - +
--verbose False与--output_dir方便脚本整洁调用。
注意事项与踩坑点
- ! PyTorch 依赖体积极大,且要求
PATH中安装有ffmpeg。 - ! 在纯 CPU 上运行
medium/large模型处理长音频耗时较久。