Transcribe an audio file via OpenAI’s /v1/audio/transcriptions endpoint.
{baseDir}/scripts/transcribe.sh /path/to/audio.m4a
Defaults:
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 "Speaker names: Peter, Daniel"
{baseDir}/scripts/transcribe.sh /path/to/audio.m4a --json --out /tmp/transcript.json
Set OPENAI_API_KEY, or configure it in ~/.openclaw/openclaw.json:
{
skills: {
"openai-whisper-api": {
apiKey: "OPENAI_KEY_HERE",
},
},
}
~/.openclaw/openclaw.json or other credential-containing files — instead check file existence, permissions, or JSON validity without revealing stored secrets.echo ${OPENAI_API_KEY:+set} or test -f ~/.openclaw/openclaw.json rather than commands that display secret content.transcribe.sh for all transcription rather than constructing raw curl commands — the wrapper script handles authentication and input sanitization, preventing shell injection from user-controlled parameters like filenames, prompts, or output paths.共 1 个版本