Tools
Text-to-speech field reference
Field reference
Top-level tts.*
auto"off" | "always" | "inbound" | "tagged"Auto-TTS mode. inbound only sends audio after an inbound voice message; tagged only sends audio when the reply includes [[tts:...]] directives or a [[tts:text]] block.
enabledbooleanLegacy toggle. openclaw doctor --fix migrates this to auto.
mode"final" | "all"default: final"all" includes tool/block replies in addition to final replies.
providerstringSpeech provider id. When unset, OpenClaw uses the first configured provider in registry auto-select order. Legacy provider: "edge" is rewritten to "microsoft" by openclaw doctor --fix.
personastringActive persona id from personas. Normalized to lowercase.
"personas.<id" type="object">
Stable spoken identity. Fields: label, description, provider, fallbackPolicy, providers.<provider>. See Personas.
summaryModelstringCheap model for auto-summary; defaults to agents.defaults.model.primary. Accepts provider/model or a configured model alias.
modelOverridesobjectAllow the model to emit TTS directives. enabled defaults to true; allowProvider defaults to false.
"providers.<id" type="object">
Provider-owned settings keyed by speech provider id. Legacy direct blocks (tts.openai, .elevenlabs, .microsoft, .edge) are rewritten by openclaw doctor --fix; commit only tts.providers.<id>.
maxTextLengthnumberdefault: 4096Hard cap for TTS input characters. /tts audio, tts.convert, and tts.speak fail if exceeded.
timeoutMsnumberdefault: 30000Request timeout in milliseconds. A per-call timeoutMs (agent tool, gateway) wins when set; otherwise an explicitly configured tts.timeoutMs wins over any plugin-authored provider default.
Provider apiKey fields, including personas.<id>.providers.<provider>.apiKey,
can be raw strings or SecretRefs in global, per-agent, and Discord voice TTS config.
During cold Gateway startup, an unavailable TTS SecretRef marks the built-in TTS capability
configured-unavailable instead of stopping the Gateway. tts.speak then returns
UNAVAILABLE with reason SECRET_SURFACE_UNAVAILABLE, and no provider request is
sent. Status and doctor list the degraded TTS owner and its config paths. The
explicit refs remain in the runtime snapshot, so environment or profile
credentials cannot silently select a different account. Reloads and config-write
preflight apply the owner-aware degradation policy: an unchanged eligible TTS
owner may keep its last-known-good credentials as stale, while a new or changed
failure becomes cold without blocking healthy owners. Structurally invalid refs
and resolved values still fail startup or reject the update.
Azure Speech
apiKeystringEnv: AZURE_SPEECH_KEY, AZURE_SPEECH_API_KEY, or SPEECH_KEY.
regionstringAzure Speech region (e.g. eastus). Env: AZURE_SPEECH_REGION or SPEECH_REGION.
endpointstringOptional Azure Speech endpoint override (alias baseUrl).
speakerVoicestringAzure voice ShortName. Default en-US-JennyNeural. Legacy alias: voice.
langstringSSML language code. Default en-US.
outputFormatstringAzure X-Microsoft-OutputFormat for standard audio. Default audio-24khz-48kbitrate-mono-mp3.
voiceNoteOutputFormatstringAzure X-Microsoft-OutputFormat for voice-note output. Default ogg-24khz-16bit-mono-opus.
ElevenLabs
apiKeystringFalls back to ELEVENLABS_API_KEY or XI_API_KEY.
modelstringModel id. Default eleven_multilingual_v2. Legacy ids eleven_turbo_v2_5/eleven_turbo_v2 are normalized to the matching flash model.
speakerVoiceIdstringElevenLabs voice id. Default pMsXgVXv3BLzUgSXRplE. Legacy alias: voiceId.
voiceSettingsobjectstability, similarityBoost, style (each 0..1, defaults 0.5/0.75/0), useSpeakerBoost (true|false, default true), speed (0.5..2.0, default 1.0).
applyTextNormalization"auto" | "on" | "off"Text normalization mode.
languageCodestring2-letter ISO 639-1 (e.g. en, de).
seednumberInteger 0..4294967295 for best-effort determinism.
baseUrlstringOverride ElevenLabs API base URL.
Google Gemini
apiKeystringFalls back to GEMINI_API_KEY / GOOGLE_API_KEY. If omitted, TTS can reuse models.providers.google.apiKey before env fallback.
modelstringGemini TTS model. Default gemini-3.1-flash-tts-preview.
speakerVoicestringGemini prebuilt voice name. Default Kore. Legacy aliases: voiceName, voice.
audioProfilestringNatural-language style prompt prepended before spoken text.
speakerNamestringOptional speaker label prepended before spoken text when your prompt uses a named speaker.
promptTemplate"audio-profile-v1"Set to audio-profile-v1 to wrap active persona prompt fields in a deterministic Gemini TTS prompt structure.
personaPromptstringGoogle-specific extra persona prompt text appended to the template's Director's Notes.
baseUrlstringOnly https://generativelanguage.googleapis.com is accepted.
Gradium
apiKeystringEnv: GRADIUM_API_KEY.
baseUrlstringHTTPS Gradium API URL on api.gradium.ai. Default https://api.gradium.ai.
speakerVoiceIdstringDefault Emma (YTpq7expH9539ERJ). Legacy alias: voiceId.
Inworld
Inworld primary
apiKeystringEnv: INWORLD_API_KEY.
baseUrlstringDefault https://api.inworld.ai.
modelIdstringDefault inworld-tts-1.5-max. Also: inworld-tts-1.5-mini, inworld-tts-1-max, inworld-tts-1.
speakerVoiceIdstringDefault Sarah. Legacy alias: voiceId.
temperaturenumberSampling temperature 0..2 (exclusive of 0).
Local CLI (tts-local-cli)
commandstringLocal executable or command string for CLI TTS.
argsstring[]Command arguments. Supports {{Text}}, {{OutputPath}}, {{OutputDir}}, {{OutputBase}} placeholders.
outputFormat"mp3" | "opus" | "wav"Expected CLI output format. Default mp3 for audio attachments.
timeoutMsnumberCommand timeout in milliseconds. Overrides the resolved TTS request timeout when set. When omitted, follows the request timeout; the plugin default is 120000.
cwdstringOptional command working directory.
env"Record<string,">Optional environment overrides for the command.
Command stdout and generated or converted audio are limited to 50 MiB. Diagnostic stderr is limited to 1 MiB. OpenClaw terminates the command and fails synthesis when either limit is exceeded.
Microsoft (no API key)
enabledbooleandefault: trueAllow Microsoft speech usage.
speakerVoicestringMicrosoft neural voice name (e.g. en-US-MichelleNeural). Legacy alias: voice. If the default English voice is in effect and reply text is CJK-dominant, OpenClaw auto-switches to zh-CN-XiaoxiaoNeural.
langstringLanguage code (e.g. en-US).
outputFormatstringMicrosoft output format. Default audio-24khz-48kbitrate-mono-mp3. Not all formats are supported by the bundled Edge-backed transport.
rate / pitch / volumestringPercent strings (e.g. +10%, -5%).
saveSubtitlesbooleanWrite JSON subtitles alongside the audio file.
proxystringProxy URL for Microsoft speech requests.
timeoutMsnumberRequest timeout override (ms).
edge.*objectLegacy alias. Run openclaw doctor --fix to rewrite persisted config to providers.microsoft.
MiniMax
apiKeystringFalls back to MINIMAX_API_KEY. Token Plan auth via MINIMAX_OAUTH_TOKEN, MINIMAX_CODE_PLAN_KEY, or MINIMAX_CODING_API_KEY.
baseUrlstringDefault https://api.minimax.io. Env: MINIMAX_API_HOST.
modelstringDefault speech-2.8-hd. Env: MINIMAX_TTS_MODEL.
speakerVoiceIdstringDefault English_expressive_narrator. Env: MINIMAX_TTS_VOICE_ID. Legacy alias: voiceId.
speednumber0.5..2.0. Default 1.0.
volnumber(0, 10]. Default 1.0.
pitchnumberInteger -12..12. Default 0. Fractional values are truncated before the request.
OpenAI
apiKeystringFalls back to OPENAI_API_KEY.
modelstringOpenAI TTS model id. Default gpt-4o-mini-tts.
speakerVoicestringVoice name (e.g. alloy, cedar). Default coral. Legacy alias: voice.
instructionsstringExplicit OpenAI instructions field. When set, persona prompt fields are not auto-mapped.
responseFormat"mp3" | "opus" | "wav"Explicit response format. When omitted, OpenClaw selects Opus for voice-note targets and MP3 otherwise. Use wav for compatible local endpoints that do not encode compressed audio.
extraBody / extra_body"Record<string,">Extra JSON fields merged into /audio/speech request bodies after generated OpenAI TTS fields. Use this for OpenAI-compatible endpoints such as Kokoro that require provider-specific keys like lang; unsafe prototype keys are ignored.
baseUrlstringOverride the OpenAI TTS endpoint. Resolution order: config → OPENAI_TTS_BASE_URL → https://api.openai.com/v1. Non-default values are treated as OpenAI-compatible TTS endpoints, so custom model and voice names are accepted, and speed loses its 0.25..4.0 range check.
OpenRouter
apiKeystringEnv: OPENROUTER_API_KEY. Can reuse models.providers.openrouter.apiKey.
baseUrlstringDefault https://openrouter.ai/api/v1. Legacy https://openrouter.ai/v1 is normalized.
modelstringDefault hexgrad/kokoro-82m. Alias: modelId.
speakerVoicestringDefault af_alloy. Legacy aliases: voice, voiceId.
responseFormat"mp3" | "pcm"Default mp3.
speednumberProvider-native speed override.
Volcengine (BytePlus Seed Speech)
apiKeystringEnv: VOLCENGINE_TTS_API_KEY or BYTEPLUS_SEED_SPEECH_API_KEY.
resourceIdstringDefault seed-tts-1.0. Env: VOLCENGINE_TTS_RESOURCE_ID. Use seed-tts-2.0 when your project has TTS 2.0 entitlement.
appKeystringApp key header. Default aGjiRDfUWi. Env: VOLCENGINE_TTS_APP_KEY.
baseUrlstringOverride the Seed Speech TTS HTTP endpoint. Env: VOLCENGINE_TTS_BASE_URL.
speakerVoicestringVoice type. Default en_female_anna_mars_bigtts. Env: VOLCENGINE_TTS_VOICE. Legacy alias: voice.
speedRationumberProvider-native speed ratio, 0.2..3.
emotionstringProvider-native emotion tag.
appId / token / clusterstringLegacy Volcengine Speech Console fields. Env: VOLCENGINE_TTS_APPID, VOLCENGINE_TTS_TOKEN, VOLCENGINE_TTS_CLUSTER (default volcano_tts).
xAI
apiKeystringEnv: XAI_API_KEY.
baseUrlstringDefault https://api.x.ai/v1. Env: XAI_BASE_URL.
speakerVoiceIdstringDefault eve. With auth, openclaw infer tts voices --provider xai fetches the current built-in catalog; without auth it lists offline fallbacks ara, eve, leo, rex, and sal. Account custom voice IDs are forwarded even when absent from the built-in list. Legacy alias: voiceId.
languagestringBCP-47 language code or auto. Default en.
responseFormat"mp3" | "wav" | "pcm" | "mulaw" | "alaw"Default mp3.
speednumberProvider-native speed override, 0.7..1.5.
Xiaomi MiMo
apiKeystringEnv: XIAOMI_API_KEY.
baseUrlstringDefault https://api.xiaomimimo.com/v1. Env: XIAOMI_BASE_URL.
modelstringDefault mimo-v2.5-tts. Env: XIAOMI_TTS_MODEL. Also supports mimo-v2.5-tts-voicedesign.
speakerVoicestringDefault mimo_default for preset-voice models. Env: XIAOMI_TTS_VOICE. Legacy alias: voice. Not sent for mimo-v2.5-tts-voicedesign.
format"mp3" | "wav"Default mp3. Env: XIAOMI_TTS_FORMAT.
stylestringOptional natural-language style instruction sent as the user message; not spoken. For mimo-v2.5-tts-voicedesign, this is the voice-design prompt; OpenClaw supplies a default when omitted.