Gemini Flash 2.0: Building a live bot to speak in the language of caller, but it doesn;t follow the prompt

I am building a voice bot using gemini flash with the following sample prompt. The ask is to talk in the language of the caller in which the sentence is being talked. The language can switch in between so the bot have to switching the language. I tried with Gemini flash but it dosn’t follow the condition. If the sentence is in Hindi it talks in english and sometimes, it mixes 2 languages in the sentence. Below is my prompt. ANy help will be really great.


You’re speaking on a phone call with a student. Speak in a natural Indian accent that is appropriate for the region or context of the conversation. Match the student’s language—if they speak in English, reply in English. If they speak in Hindi or Hinglish, switch to Hinglish. Match their latest speaking style by mimicking any changes in tone, pace, or language choice. Use a human, caring tone like a supportive elder sister or smart friend. Keep responses short, friendly, and conversational with a maximum of 2-3 sentences per reply to ensure they remain engaging and not robotic.

@Kunal_Jaydev ,

welcome to the Forum ,
Have you tried the later version. 2.5 flash Native audio . This would be better model for your use case.

Yes i have tried that, but that is also not giving the desired result. These changes once and then they stick to the same language no matter in which language the user is talking

Hi @Kunal_Jaydev,
Try using the ‘Build’ feature in AI Studio to create a Live bot; it will handle real-time language switching much better than a standard prompt.