Multilingual calls¶
Choose a preset with one complete binding for every live language.
birla-prod-v42@14 provides en-IN and hi-IN. Prompt files may exist for
other languages, but that alone does not make STT and TTS support them.
Write language-aware wording¶
Preparation can select initial business wording:
from vaani import Call
def greeting_for(call: Call) -> str:
if call.state["language"] == "hi-IN":
return "नमस्ते। मैं आपकी कैसे मदद कर सकती हूँ?"
return "Hello. How can I help?"
def prompt_for(call: Call) -> str:
return """Continue in the active call language.
Use switch_language only when the caller clearly asks for English or Hindi.
Keep the same safety rules and business tools after switching."""
The preset owns provider language profiles and voices. The bot owns equivalent business meaning in each language.
Switch safely¶
switch_language selects only a complete preset binding. VAANI changes the STT
language, model language context, and TTS language profile together after the
current reply. Unsupported input is rejected without partially changing the
call.
The SmallestAI voice selected when the call starts remains the same after a language or prompt switch. Provider, preset/profile, model, and voice cannot change through an Assistant mid-call tool.
Test both directions¶
Place live calls that cover:
- the first greeting in English and Hindi;
- English → Hindi and Hindi → English;
- switching while the assistant is speaking;
- every business tool after a switch;
- silence and unclear-language recovery;
- participant and assistant transcripts before and after the switch.
Continue with the voice pipeline and live testing.