Does LiveKit real time voice session support multi...
# ask-ai
b
Does LiveKit real time voice session support multi-language?
t
Thanks for reaching out, Ming. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm happy to share that LiveKit real-time voice sessions warmly embrace multi-language capabilities to make your experience smooth and inclusive. Here’s a little overview: • Multilingual Speech-to-Text (STT): We support a wonderful variety of languages like English, Spanish, French, German, Japanese, and more, thanks to integrations with trusted providers like Deepgram and Gladia. • Real-Time Translation: Imagine your speech being translated and synthesized into another language right as you speak! This works beautifully with languages such as English, German, Spanish, French, Japanese, and Mandarin. • Dynamic Language Switching: You can effortlessly switch between languages like English, Spanish, French, German, and Italian during your session, making conversations flow naturally. • Multilingual Turn Detection: This handy feature supports 14 languages to keep track of conversational context, even when mixed languages come into play. • Code-Switching: We’ve got you covered when switching between languages within a single utterance, making interactions feel truly natural. All these features are designed to make LiveKit a great fit for multilingual applications like global meetings or customer support. If you’d like, I’m here to help with more details on how to bring these features to life for you! Sources: livekit-agents/livekit/agents/inference/stt.py | LiveKit turn detector plugin | LiveKit Docs | README.md | Building the all-in-one platform for voice AI agents | Docs::Agents
b
Looks like LiveKit is using
google.realtime.RealtimeModel
to create Gemini Live API session. But I don't see how to enable multi-language to specify a non-English language
t
I'm happy to help you enable multi-language support in the
google.realtime.RealtimeModel
for Gemini Live API sessions! You can easily set the language by using the
language
parameter, which accepts BCP-47 language codes. For example, if you'd like to set the language to Spanish (es-ES), you can do it like this:
Copy code
from livekit.plugins import google

session = AgentSession(
    llm=google.beta.realtime.RealtimeModel(
        model="gemini-2.0-flash-exp",
        voice="Puck",
        temperature=0.8,
        instructions="You are a helpful assistant",
        language="es-ES"
    ),
)
If you want to switch languages dynamically during a session, the
RealtimeModel
class has an
updateOptions
method that can update settings like
voice
and
temperature
. However, it's not fully clear if
language
can be changed this way. A reliable approach is to create a new
RealtimeModel
instance with the new language settings whenever you need to switch languages. For more details on the languages supported, please check out the Gemini Live API documentation. If you have any other questions or need a hand with this, feel free to reach out—I'm here to help! Sources: livekit-plugins/livekit-plugins-turn-detector/README.md | plugins/google/README.md | Gemini Live API integration guide | LiveKit Docs | LiveKit turn detector plugin | LiveKit Docs | agent/main.py