CLI 目录 横向对比 FCRS-1.0 标准 /llms.txt
← 返回 CLI 目录

OpenAI Whisper CLI

$ whisper 官方出品 低风险
OpenAI · AI 能力与音视频 · MIT · macos / linux / windows

OpenAI whisper CLI 基于 PyTorch 与 ffmpeg 在本地完成 99+ 种语言的语音识别,可通过 --output_format json 与 --output_dir 导出 .txt、.srt、.vtt、.tsv 或带时间戳的 .json 文件。

FCRS-1.0 综合评分
82 /100
良好 (Good)
中置信度 (源码/文档)
零摩擦安装命令
brew install openai-whisper
CLI vs MCP 选型建议 仅 CLI 可用

直接将音视频离线转录为本地 .json 或 .srt 文件,避免将庞大媒体内容送入 LLM 上下文。

Agent 友好度体检单

✓ 原生 JSON 输出
— 字段裁剪
✓ 无头非交互
— 支持 Dry-Run
— 只读模式开关
✓ 支持 NO_COLOR
— 自省/Schema 发现
— 官方 SKILL.md

当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。

FCRS-1.0 六维评分拆解

Agent 友好度 19 / 25

支持输出干净的 --output_format json 文件以及 --verbose False 与 --output_dir,但默认写文件而非向 stdout 打印 JSON。

  • Supports --output_format json|txt|srt|vtt|tsv, --output_dir, and --verbose False
安全与权限边界 24 / 25

缓存权重后 100% 离线本地处理音频,无任何 API 密钥或云端上传风险。

  • Offline local inference; writes transcript artifacts only to --output_dir
安装与运行摩擦 10 / 15

依赖 Python、体积较大的 PyTorch 以及系统 PATH 中的 ffmpeg。

  • Requires PyTorch (~2+ GB) and ffmpeg on PATH
能力覆盖与边际价值 13 / 15

多语种识别准确率高且附带分段时间戳,但在 CPU 上运行大模型耗时较长。

  • 99+ language ASR with timestamped JSON and SRT/VTT outputs
维护与来源背书 8 / 10

OpenAI 官方开源仓库(openai/whisper),MIT 协议(代码已趋于稳定)。

  • Official openai/whisper repository
文档与可验证性 8 / 10

README 与 --help 参数说明清晰。

  • README and --help at github.com/openai/whisper

安全边界、鉴权与放权指南

鉴权方式
无需鉴权
凭证存储位置

模型权重下载至 ~/.cache/whisper/ 后完全离线推理;无需任何 API 密钥。

潜在副作用
只读查询 本地写入
费用与配额提示

免费开源(MIT 协议)本地 Python CLI;依赖 PyTorch 与 ffmpeg。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# 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 可用参数与模型规格
whisper --help

列出支持的 --model 规格(tiny、base、small、medium、large、turbo)与导出格式。

受控写入与预演

将音频转录为带时间戳的 JSON 文件
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 模型处理长音频耗时较久。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI