add_language
add_language
Add a language configuration with voice settings. The agent uses these configurations to support multilingual conversations with appropriate TTS voices.
Language configurations map to the SWML ai.languages array.
See the SWML languages reference for the full specification.
The voice parameter supports three formats: a simple voice name, an explicit
engine/model via separate parameters, or a combined "engine.voice:model" string.
Parameters
name
Human-readable language name (e.g., "English", "French", "Spanish").
code
Language code (e.g., "en-US", "fr-FR", "es-MX").
voice
TTS voice identifier. Accepts one of three formats:
- Simple name:
"en-US-Neural2-F" - Combined format:
"elevenlabs.josh:eleven_turbo_v2_5" - Short name with explicit
engine/model:"josh"
speech_fillers
Filler phrases used during natural speech pauses (e.g., ["Um...", "Let me see..."]).
function_fillers
Filler phrases spoken while executing SWAIG functions
(e.g., ["One moment please...", "Looking that up..."]).
engine
Explicit TTS engine name (e.g., "elevenlabs", "rime"). Overrides the
combined string format if provided.
model
Explicit TTS model name (e.g., "eleven_turbo_v2_5", "arcana"). Overrides the
combined string format if provided.
Returns
AgentBase — Returns self for method chaining.