SuperAPI AI 工具集

openai-whisper-api

编程与开发

查看项目

更新于 10-16 07:23

技能介绍

用途:调用 OpenAI 的 /v1/audio/transcriptions 接口,把音频文件转写为文本。

主要能力:提供脚本 {baseDir}/scripts/transcribe.sh,默认模型为 whisper-1,默认输出为与输入同名的 <input>.txt 文件。支持通过参数指定模型、输出路径、语言和提示词,并可用 --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";输出 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。

限制:资料未提供支持的文件格式、大小上限、计费方式、错误处理及并发等细节。