important-kitchen-1796
11/19/2025, 9:34 AMSetup
• *Server:* LiveKit server (self-hosted)
• *Worker:* livekit-agents (Python), WorkerType.ROOM
• Voice pipeline:
◦ vad = silero.VAD.load()
◦ stt = assemblyai.STT(...)
◦ llm = openai.LLM(model="gpt-4o-mini")
◦ tts = openai.TTS(model="tts-1", voice="alloy")
• *Avatar:* livekit.plugins.bey.AvatarSession
• *Audio output:* whatever Bey plugin wires up (TranscriptSynchronizer -> DataStreamAudioOutput)
High-level behaviour
• *Without avatar*:
• Multiple sessions back-to-back in the same worker work perfectly.
• Every user turn → STT final → LLM → TTS → audio is played.
• *With avatar enabled*:
• Session-1 (first job in the worker)
▪︎ Everything works: avatar speaks, user replies, multiple turns.
• TTS metrics are logged, and we see:
•
◦ playback finished event received {"caller_identity": "bey-avatar-room-fdfd6b2c"}
• Session-2 (second job in the same worker)
▪︎ LLM + TTS still run (I see TTS metrics with non-zero audio_duration for multiple turns).
▪︎ Avatar shows up in the room.
◦ BUT there is *never* a single playback finished event logged for that session's avatar identity.
So effectively: *audio is generated, but the Bey/Datastream side never acknowledges playback on the 2nd session.*tall-airline-16756
11/20/2025, 12:40 PM