config.language is one code shared by every speech model in the pipeline: stt, tts, realtime and their fallbacks. Each model receives it in its own spelling (Hindi reaches Deepgram as hi and Sarvam as hi-IN). null means Auto and is the default. On a text agent it applies to the voice-note stt only, and is cleared when there is none; set the reply language in the prompt.
Rules
Pick the language first, then models that cover it. Filter the catalog’s
stt, tts and realtime entries on their languages, and pass language to GET /v1/catalog/voices to filter voices.
How a code matches a model
- Exact: the model publishes the code.
- Widen: you asked for
en-GBand the model hasen. - Narrow: you asked for
hiand the model has exactly one variant, such ashi-IN. If it has several (pt-BRandpt-PT), itsdefault_languagebreaks the tie if it fits; otherwise the match fails.
or and Sarvam’s od-IN.
What Auto does
Withlanguage: null, each model falls back to its catalog default_language:
Exceptions to read the table with:
xaispeech-to-text declaresenbut always detects; the code only controls number and currency formatting.rayaspeech-to-text never detects, and the code selects the output script (Devanagari onhi, romanized onen). Hindi audio onenloses words. Setlanguageon any Indic agent using Raya.sarvam/bulbul:*takes the spoken language from the text it is given.- OpenRouter speech-to-text always detects; no code is sent to it.
language_requiredmodels (such assoniox/tts-rt-v2) refuse Auto. On Soniox TTS the code is the phonetic system the text is read through, so English text sent as another language is unintelligible.
default_language is empty, auto or multi.
Check before you publish
POST /v1/agents/{agent_id}/validate lists every model that cannot speak the language in one response.
Next
Speech and turn detection
Why the language changes how a turn ends.
Voices
Filtering voices by language.