better-soccer-44421
09/28/2025, 4:17 AMtall-airline-16756
09/28/2025, 4:17 AMtall-airline-16756
09/28/2025, 4:17 AMbetter-soccer-44421
09/28/2025, 4:19 AMgoogle.realtime.RealtimeModel to create Gemini Live API session. But I don't see how to enable multi-language to specify a non-English languagetall-airline-16756
09/28/2025, 4:20 AMgoogle.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:
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