用途:调用 OpenAI 的 /v1/audio/transcriptions 接口,把音频文件转写为文本。
主要能力:提供脚本 {baseDir}/scripts/transcribe.sh,默认模型为 whisper-1,默认输出为 <输入文件名>.txt。支持通过参数指定模型、输出路径、语言和提示词,并支持以 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" JSON 输出:{baseDir}/scripts/transcribe.sh /path/to/audio.m4a --json --out /tmp/transcript.json
API 密钥:需设置环境变量 OPENAI_API_KEY,或在 ~/.openclaw/openclaw.json 中配置 skills.openai-whisper-api.apiKey。
限制:资料未说明支持的音频格式范围、文件大小上限、计费方式及错误处理细节,暂未提供。