prehistoric-hamburger-31861
09/02/2025, 7:00 AMtall-airline-16756
09/02/2025, 7:00 AMtall-airline-16756
09/02/2025, 7:00 AMMultilingualModel() in LiveKit supports 13 different languages:
• Chinese
• Dutch
• English
• French
• German
• Indonesian
• Italian
• Japanese
• Korean
• Portuguese
• Russian
• Spanish
• Turkish
What’s even cooler is that it can handle conversations where people switch between these languages in the same session. Pretty handy, right?
Sources: LiveKit turn detector plugin | LiveKit Docs | Building the all-in-one platform for voice AI agentsprehistoric-hamburger-31861
09/02/2025, 7:01 AMtall-airline-16756
09/02/2025, 7:02 AMMultilingualModel() doesn’t support Arabic for semantic turn detection yet. But no worries—you can still switch between English and Arabic in your app by updating the language settings of your STT and TTS plugins on the fly. Here’s a quick example:
# Example of switching STT and TTS languages at runtime
self.stt.update_options(language="ar") # Switch STT to Arabic
self.tts.update_options(language="ar") # Switch TTS to Arabic
When Arabic is active, turn detection will use VAD (Voice Activity Detection) instead of semantic cues. You can also tweak endpointing delays or add your own custom logic to make turn-taking smoother in Arabic.
Sources: LiveKit turn detector plugin | LiveKit Docs | livekit-plugins/livekit-plugins-turn-detector/README.md | Groq TTS integration guide | LiveKit Docs | Groq and LiveKit | LiveKit Docs | plugins/livekit/src/turn_detector/multilingual.tsprehistoric-hamburger-31861
09/02/2025, 7:03 AMtall-airline-16756
09/02/2025, 7:04 AMinput_audio_transcription=None in the RealtimeModel, then plug in your custom STT instance.
• Custom TTS: Turn off the built-in TTS by setting modalities=[Modality.TEXT], and add your custom TTS plugin to the AgentSession.
• Image Input: Use ImageContent to add images into the chat context or push_video() if you want to send live video frames.
Here’s a quick example to get you started:
from livekit.agents import AgentSession, ChatContext, ImageContent
from livekit.plugins.deepgram import STT
from livekit.plugins.cartesia import TTS
# Initialize your custom STT and TTS
custom_stt = STT(api_key="your-deepgram-api-key")
custom_tts = TTS(api_key="your-cartesia-api-key")
# Set up Gemini Live API
session = AgentSession(
llm=google.beta.realtime.RealtimeModel(
modalities=[Modality.TEXT],
input_audio_transcription=None,
model="gemini-2.0-flash-exp",
instructions="You are a helpful assistant with vision capabilities."
),
stt=custom_stt,
tts=custom_tts,
)
# Add an image to the chat context
chat_ctx = ChatContext()
chat_ctx.add_message(
role="user",
content=[ImageContent(image="data:image/jpeg;base64,encoded_image")]
)
await session.update_chat_ctx(chat_ctx)
This setup lets you enjoy the best of both worlds—using Gemini Live for text and image processing, while your custom STT and TTS handle audio input and output smoothly. If you have any questions or want to chat more about it, just let me know!
Sources: Vision | LiveKit Docs | Gemini Live API integration guide | LiveKit Docs | livekit-plugins/livekit-plugins-google/livekit/plugins/google/beta/realtime... | plugins/google/src/beta/gemini_tts.ts | Gemini TTS integration guide | LiveKit Docsprehistoric-hamburger-31861
09/02/2025, 7:05 AMtall-airline-16756
09/02/2025, 7:05 AM