SuperAPI AI 工具集

openai-whisper-api

编程与开发

查看项目

更新于 10-15 23:59

技能介绍

用途:调用 OpenAI 的 /v1/audio/transcriptions 接口,将音频文件转写为文本,基于 curl 实现,适合在命令行中批量处理语音文件。

主要能力:提供 scripts/transcribe.sh 脚本,默认使用 whisper-1 模型,默认输出为与输入同名的 .txt 文件。支持通过参数指定模型(--model)、输出路径(--out)、语言(--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,或在 ~/.clawdbot/clawdbot.json 中配置 skills.openai-whisper-api.apiKey。

适用场景:语音转文字、会议或访谈录音整理、字幕初稿生成等命令行自动化流程。

限制:依赖 OpenAI API 与有效密钥,实际费用、语言支持范围与文件大小限制以官方服务为准,资料未提供。