better-sandwich-65834
12/18/2025, 7:20 AMtall-airline-16756
12/18/2025, 7:20 AMtall-airline-16756
12/18/2025, 7:20 AMprovider/model:language.
Example: stt="deepgram/nova-2:es" (Spanish).
• To set language with the STT config object:
from livekit.agents import inference
session = AgentSession(
stt=inference.STT(
model="deepgram/nova-2",
language="fr"
),
)
• For unknown/multi-language audio:
◦ Use language="multi" with multilingual models (e.g., Nova-2/Nova-3).
◦ Or use stt="auto:language-code" to let LiveKit pick the best model.
• To change language at runtime:
if self.session.stt is not None:
self.session.stt.update_options(language="es")
Supported languages depend on the provider/model (e.g., Deepgram Nova-2, ElevenLabs Scribe V2, Cartesia Ink).
If you meant something other than STT, tell me which system or give an example of your setup (code snippet or provider/model) and I’ll give exact steps.
Sources: Speech-to-text (STT) models | LiveKit Docs | ElevenLabs Change Language | LiveKit docsbetter-sandwich-65834
12/18/2025, 7:21 AMtall-airline-16756
12/18/2025, 7:21 AMinstructions="Respond in French."
• Or include explicit per‑request instructions in the conversation messages to switch languages dynamically.
• Control model selection:
◦ Use the desired Realtime model when creating the RealtimeModel instance (the model choice determines generation behavior).
• TTS language/voice:
◦ Choose a TTS provider/model that supports the target language (e.g., cartesia/sonic-3) and set its language/voice options as required. TTS must match the language you instruct the LLM to produce.
• Dynamic switching at runtime:
◦ Update model instructions or pass language context per request to change language on the fly.
◦ Then call your TTS with the matching language/voice.
If you want, tell me:
• which Realtime model you’re using,
• which TTS provider/model,
• and whether you need automatic language detection or explicit control per message —
and I’ll give exact code snippets for your setup.
Sources: Realtime model plugins | LiveKit Docs | Gemini Live API plugin | LiveKit docs