用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/openJiuwen-ai/relay --skill openai-whisper-cn命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | openai-whisper-cn |
| description | 本地语音转文字(Whisper CLI),国内加速版,无需 API Key。 |
| homepage | https://openai.com/research/whisper |
| metadata | {"openclaw":{"requires":{"bins":"[Truncated]"},"install":["[Truncated]"]}} |
使用 whisper CLI 在本地转录音频,无需 API Key,完全开源。
pip install -i https://mirrors.aliyun.com/pypi/simple/ openai-whisper imageio-ffmpeg
imageio-ffmpeg:内置小型 ffmpeg(~20MB),pip 安装即用,无需单独安装系统 ffmpeg。
首次运行时,Whisper 会下载模型到 ~/.cache/whisper。
# 设置 HuggingFace 镜像
export HF_ENDPOINT=https://hf-mirror.com
执行转录前,先检查并下载模型!
直接执行 whisper 命令时,模型下载可能不走镜像而失败。
Linux/macOS:
ls ~/.cache/whisper/
Windows(CMD):
dir %USERPROFILE%\.cache\whisper\
Linux/macOS:
export HF_ENDPOINT=https://hf-mirror.com
python -c "import whisper; whisper.load_model('base')"
Windows(CMD):
set HF_ENDPOINT=https://hf-mirror.com
python -c "import whisper; whisper.load_model('base')"
export HF_ENDPOINT=https://hf-mirror.com
whisper audio.mp3 --model base --language zh
# 中文音频
whisper audio.mp3 --language zh --model base --output_format txt
# 英文音频
whisper audio.mp3 --language en --model base
# 翻译(非英语 → 英语)
whisper audio.mp3 --task translate --model base
先用 base,效果不好再换大的。
base → small → medium → large
base 是首选(~150MB,平衡速度和效果),日常使用推荐。
tiny 只用于超大文件:音频 >1小时、需要快速跑完时用 tiny(~75MB,最快但效果差)。
| 模型 | 大小 | 速度 |
|---|---|---|
| tiny | ~75MB | 最快 |
| base | ~150MB | 较快 |
| small | ~500MB | 中等 |
| medium | ~1.5GB | 慢 |
先单独下载模型:
export HF_ENDPOINT=https://hf-mirror.com
python -c "import whisper; whisper.load_model('base')"
手动下载:访问 https://hf-mirror.com/openai/whisper-base,下载 .pt 文件放到 ~/.cache/whisper/
Whisper 需要 ffmpeg 处理音频。
推荐方案(国内用户):安装 imageio-ffmpeg
pip install -i https://mirrors.aliyun.com/pypi/simple/ imageio-ffmpeg
pip 国内镜像下载,秒装。但需要把 ffmpeg 目录加到 PATH:
Windows(CMD):
:: 临时加 PATH(只当前 CMD 有效)
set PATH=%PATH%;%USERPROFILE%\AppData\Local\Programs\OfficeClaw\tools\python\Lib\site-packages\imageio_ffmpeg\binaries
:: 或永久加 PATH
setx PATH "%PATH%;%USERPROFILE%\AppData\Local\Programs\OfficeClaw\tools\python\Lib\site-packages\imageio_ffmpeg\binaries"
Linux/macOS:
export PATH=$PATH:$(python -c "import imageio_ffmpeg; print(imageio_ffmpeg.get_ffmpeg_exe())" | dirname)
备选方案:系统 ffmpeg
Linux:
apt install ffmpeg # Ubuntu/Debian
macOS:
brew install ffmpeg
Windows:
winget install ffmpeg
注意:Windows winget 从 GitHub 下载,国内可能很慢。推荐用 imageio-ffmpeg。
换小模型:--model tiny 或 --model base