用途:本技能用于调用 OpenAI 音频转录 API(Whisper),把本地音频文件转写为文本。
主要能力:脚本默认使用 whisper-1 模型,默认输出为与输入同名的 <input>.txt 文件。支持通过参数指定模型、输出路径、语言(--language)和提示词(--prompt),也可用 --json 输出 JSON 格式结果。
使用方式: {baseDir}/scripts/transcribe.sh /path/to/audio.m4a 带参数示例: {baseDir}/scripts/transcribe.sh /path/to/audio.ogg --model whisper-1 --out /tmp/transcript.txt {baseDir}/scripts/transcribe.sh /path/to/audio.m4a --language en {baseDir}/scripts/transcribe.sh /path/to/audio.m4a --prompt "Speaker names: Peter, Daniel" {baseDir}/scripts/transcribe.sh /path/to/audio.m4a --json --out /tmp/transcript.json
鉴权:需设置环境变量 OPENAI_API_KEY,或在 ~/.openclaw/openclaw.json 中配置 skills 下的 openai-whisper-api apiKey。
限制:资料未提供支持的全部音频格式、文件大小上限、计费方式及错误处理细节。