Hi! I have a question regarding the creation of agents using OpenAI’s Realtime LLM in text mode together with ElevenLabs TTS. I’m not able to generate the full audio — the generation stops halfway, and the audio gets cut off before finishing.
Hi, yes I am, here's the code I'm currently using. My problem is only happening when using the Elevenlabs plugin; it works normally with Azure Speech.
session = _AgentSession_(
userdata=userdata,
llm=openai.realtime.RealtimeModel._with_azure_(
modalities=["text"],
),
tts=elevenlabs._TTS_(
_voice_id_="cFylwQo5ufGYUNyRS167",
),
)
gentle-quill-48181
12/02/2025, 11:22 AM
the livekit version that im using is: "livekit-agents[azure,elevenlabs,nltk,openai]>=1.3.5",
l
lively-winter-88668
12/02/2025, 2:54 PM
😕 I can't match your setup because I don't have a test key for Realtime OpenAI with Azure so I'll have to ask around or create one. I did try with OpenAI realtime + Elevenlabs TTS and that config does not show any cut off. Do you see anything in the agent observability view? https://docs.livekit.io/agents/observability/, that should give some indication if the TTS is being cut short.