narrow-engineer-85614
09/25/2025, 3:06 PMtall-airline-16756
09/25/2025, 3:06 PMtall-airline-16756
09/25/2025, 3:07 PMAgentSession mid-conversation to switch languages when using Deepgram. This is done using the update_options method, which lets you dynamically update the Deepgram STT settings during an active session. For instance, you can change the language parameter to your desired language code (like fr-CA for French), and the change will take effect right away for any new audio input.
What’s great is that the update_options method also applies these updates to all active SpeechStream instances, so you get smooth language switching without needing to restart the agent. If you’d like, I’m here to provide more details or examples—just let me know!
Sources: livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/stt.py | pipeline-tts/elevenlabs_change_language.py | LiveKit turn detector plugin | LiveKit Docs | Gladia integration guide | LiveKit Docsnarrow-engineer-85614
09/25/2025, 3:09 PMtall-airline-16756
09/25/2025, 3:09 PMupdate_options method. Let me walk you through the steps:
1. First, find the correct Deepgram language code for the language you want to switch to (for example, en-US for English or fr-CA for French).
2. Next, call the update_options method on your Deepgram STT instance, passing in the new language code. It looks like this:
self.stt.update_options(language="fr-CA")
This will update the language setting right away for your STT instance and apply the change to all active SpeechStream instances. So, the very next audio input will be transcribed in the new language you selected.
If you have any questions or would like me to provide a more detailed example, just let me know—I’m here to help!