Multilingual Auto-Switch
The Multilingual Auto-Switch tool detects when a caller speaks a different language and automatically switches the agent’s TTS voice and STT model mid-call. The agent continues the conversation seamlessly in the new language.Automatic language following
When your agent’s speech-to-text language is set to auto-detect (for example Sarvam Saaras, or any transcriber set to “multi”), the agent follows the caller’s language on its own — no tool, no configuration:- It detects the language of each caller message and replies in that same language.
- It handles mid-call switches turn by turn — a caller can open in English, move to Hindi, and switch back, and the agent keeps up every time.
- It mirrors code-mixing. A caller speaking Hinglish (Hindi and English blended in one sentence) — or Tanglish, Tenglish, and similar mixes — gets a reply in the same mixed style, rather than being pushed into one pure language.
- Hindi and Marathi are told apart correctly even though they share the Devanagari script, so the agent answers in the language the caller actually spoke.
How It Works
Configuration
| Setting | Type | Default | Description |
|---|---|---|---|
multilingualEnabled | boolean | false | Enable multilingual auto-switch |
multilingualPrimaryLanguage | string | en | Primary language code |
languageVoiceMap | object | {} | Map of language code to TTS/STT config |
Language Voice Map Entry
Each entry inlanguageVoiceMap configures the voice for that language:
| Field | Type | Description |
|---|---|---|
ttsVoice | string | Voice ID to use for this language |
ttsModel | string | TTS model to use (e.g., aura-2, aero, sonic-3) |
sttLanguage | string | STT language code |
LLM Tool
Tool name:switch_language
- Looks up the language in
languageVoiceMap - Creates a new TTS instance with the target voice
- Updates the STT language
- Swaps the agent’s TTS mid-session via
session.update_agent()
Supported Languages
Any language supported by your TTS/STT providers. Common combinations:| Language | TTS Provider | Example Voice |
|---|---|---|
| English | Deepgram Aura-2 | aura-2-thalia-en |
| Spanish | Deepgram Aura-2 | aura-2-thalia-es |
| French | Deepgram Aura-2 | aura-2-thalia-fr |
| German | Deepgram Aura-2 | aura-2-thalia-de |
| Hindi | Aero | aero-ananya, aero-kavya |
| Hindi | Sarvam | anushka, arya |
| Japanese | Deepgram Aura-2 | aura-2-thalia-ja |

