fancy-florist-19716
12/09/2025, 2:13 PMlanguage param in TTS string descriptor for AgentSession?
Question: Hi everyone, I'm setting up an AgentSession using LiveKit Inference. I know I can configure TTS using the shorthand string descriptor like this:
session = AgentSession(
# Format: provider/model:voice_id
tts="elevenlabs/eleven_turbo_v2_5:Xb7hH8MSUJpSbSDYk0k2",
# ... llm, stt, vad, etc.
)
However, I also need to specify the language option (e.g., forcing "en" or another language code). I know I can achieve this by importing inference and instantiating the object explicitly:
from livekit.agents import AgentSession, inference
session = AgentSession(
tts=inference.TTS(
model="elevenlabs/eleven_turbo_v2_5",
voice="Xb7hH8MSUJpSbSDYk0k2",
language="en" # <--- This is what I need
),
# ...
)
Is there a way to pass this language option directly in the string descriptor format? (e.g., something like "elevenlabs/eleven_turbo_v2_5:voice_id?language=en")?
Or is the object-based instantiation the only way to handle parameters beyond just the model and voice ID?
Thanks!refined-appointment-81829
12/09/2025, 3:04 PMfancy-florist-19716
12/10/2025, 12:43 PMrefined-appointment-81829
12/10/2025, 1:01 PM