enough-dentist-75383
11/07/2025, 8:01 AMtall-airline-16756
11/07/2025, 8:01 AMtall-airline-16756
11/07/2025, 8:04 AMon_user_turn_completed callback, the preemptively generated response is canceled and a new one is created to stay accurate.
• When set to False: The agent waits until the user’s speech turn is completely finished (after receiving both the final transcript and VAD signals) before starting to generate a response. While this adds a bit more delay, it avoids doing any speculative work.
To give you a clearer picture, with _preemptive_generation_ set to True, latency can drop to about 0.8 seconds compared to around 1.1 seconds when it’s False. So, it really comes down to what matters more for your use case—lower latency or avoiding speculative responses. I hope this helps you decide what’s best for your setup!
Sources: Agent Session & Client Integration | livekit/livekit_composite | DeepWiki | livekit-agents/livekit/agents/voice/agent_activity.py | Agent speech and audio | LiveKit docs | Agent speech and audio | LiveKit docsenough-dentist-75383
11/07/2025, 8:07 AMtall-airline-16756
11/07/2025, 8:08 AM