OpenAI Whisper API (curl)
透過 OpenAI 的 /v1/audio/transcriptions 端點轉錄音訊檔案。
快速開始
{baseDir}/scripts/transcribe.sh /path/to/audio.m4a
預設值:
- 模型:
whisper-1 - 輸出:
<輸入檔名>.txt
常用旗標
{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 "發言者姓名:Peter, Daniel"
{baseDir}/scripts/transcribe.sh /path/to/audio.m4a --json --out /tmp/transcript.json
API 金鑰
設定 OPENAI_API_KEY 環境變數,或在 ~/.otto/otto.json 中配置:
{
skills: {
"openai-whisper-api": {
apiKey: "OPENAI_KEY_HERE",
},
},
}