docs/nodes/audio.md
When audio understanding is enabled (or auto-detected), OpenClaw:
maxBytes before sending to each model entry.Body with an [Audio] block and sets {{Transcript}}.When transcription succeeds, CommandBody/RawBody are also set to the transcript so slash commands still work. With --verbose, logs show when transcription runs and when it replaces the body.
If you have not configured models and tools.media.audio.enabled is not false, OpenClaw auto-detects in this order and stops at the first working option:
models.providers.* entry with auth available for a provider that supports audio transcription. This is checked before local CLIs, so a configured API key always wins over a local binary on PATH.
Provider priority when multiple are configured: Groq, OpenAI, xAI, Deepgram, Google, SenseAudio, ElevenLabs, Mistral.sherpa-onnx-offline (requires SHERPA_ONNX_MODEL_DIR with tokens.txt, encoder.onnx, decoder.onnx, and joiner.onnx)whisper-cli (from whisper-cpp; uses WHISPER_CPP_MODEL or a bundled tiny model)whisper (Python CLI; downloads models automatically)Gemini CLI auto-detect for media understanding was replaced by a sandboxed Antigravity CLI (agy) fallback for image/video; audio does not use a CLI fallback beyond the local binaries above.
To disable auto-detection, set tools.media.audio.enabled: false. To customize, set tools.media.audio.models.
{
tools: {
media: {
audio: {
enabled: true,
maxBytes: 20971520,
models: [
{ provider: "openai", model: "gpt-4o-transcribe" },
{
type: "cli",
command: "whisper",
args: ["--model", "base", "{{MediaPath}}"],
timeoutSeconds: 45,
},
],
},
},
},
}
{
tools: {
media: {
audio: {
enabled: true,
scope: {
default: "allow",
rules: [{ action: "deny", match: { chatType: "group" } }],
},
models: [{ provider: "openai", model: "gpt-4o-transcribe" }],
},
},
},
}
{
tools: {
media: {
audio: {
enabled: true,
models: [{ provider: "deepgram", model: "nova-3" }],
},
},
},
}
{
tools: {
media: {
audio: {
enabled: true,
models: [{ provider: "mistral", model: "voxtral-mini-latest" }],
},
},
},
}
{
tools: {
media: {
audio: {
enabled: true,
models: [{ provider: "senseaudio", model: "senseaudio-asr-pro-1.5-260319" }],
},
},
},
}
{
tools: {
media: {
audio: {
enabled: true,
echoTranscript: true, // default is false
echoFormat: '📝 "{transcript}"', // optional, supports {transcript}
models: [{ provider: "openai", model: "gpt-4o-transcribe" }],
},
},
},
}
models.providers.*.apiKey).DEEPGRAM_API_KEY when provider: "deepgram" is used. Setup details: Deepgram.SENSEAUDIO_API_KEY when provider: "senseaudio" is used. Setup details: SenseAudio.baseUrl, headers, and providerOptions via tools.media.audio.tools.media.audio.maxBytes). Oversize audio is skipped for that model and the next entry is tried.maxChars for audio is unset (full transcript). Set tools.media.audio.maxChars or a per-entry maxChars to trim output.gpt-4o-transcribe; set model: "gpt-4o-mini-transcribe" for a cheaper/faster option.tools.media.audio.attachments to process multiple voice notes (mode: "all" plus maxAttachments, default 1).{{Transcript}}.tools.media.audio.echoTranscript is off by default; enable it to send a transcript confirmation back to the originating chat before agent processing.tools.media.audio.echoFormat customizes the echo text (placeholder: {transcript}; default 📝 "{transcript}").args should use {{MediaPath}} for the local audio file path. Run openclaw doctor --fix to migrate deprecated {input} placeholders from older audio.transcription.command configs (retired key: audio.transcription, replaced by tools.media.audio.models).Provider-based audio transcription honors standard outbound proxy env vars, matching undici's EnvHttpProxyAgent semantics:
HTTPS_PROXY / https_proxyHTTP_PROXY / http_proxyALL_PROXY / all_proxyLowercase variables take precedence over uppercase; NO_PROXY/no_proxy entries (hostnames, *.suffix, or host:port) bypass the proxy. If no proxy env vars are set, direct egress is used. If proxy setup fails (malformed URL), OpenClaw logs a warning and falls back to direct fetch.
When requireMention: true is set for a group chat, OpenClaw transcribes audio before checking for mentions. This lets voice notes pass the mention gate even when the message has no text body.
How it works:
@BotName, emoji triggers).Fallback behavior: if preflight transcription fails (timeout, API error, etc.), the message falls back to text-only mention detection so mixed messages (text + audio) are never dropped.
Opt-out per Telegram group/topic:
channels.telegram.groups.<chatId>.disableAudioPreflight: true to skip preflight transcript mention checks for that group.channels.telegram.groups.<chatId>.topics.<threadId>.disableAudioPreflight to override per-topic (true to skip, false to force-enable).false (preflight enabled when mention-gated conditions match).Example: a user sends a voice note saying "Hey @Claude, what's the weather?" in a Telegram group with requireMention: true. The voice note is transcribed, the mention is detected, and the agent replies.
chatType is normalized to direct, group, or channel.jq -r .text.parakeet-mlx, if you pass --output-dir, OpenClaw reads <output-dir>/<media-basename>.txt when --output-format is txt (or omitted); non-txt output formats fall back to stdout parsing.timeoutSeconds, default 60s) to avoid blocking the reply queue.