I’ve built one agent successfully, but I’m noticin...
# agents
l
I’ve built one agent successfully, but I’m noticing a delay of around 6–7 seconds before the audio is generated. Could you please help me understand why this might be happening? I’d like to reduce or ideally eliminate the delay for a smoother real-time experience.
l
6-7 seconds is way too long, there are a number of parts of the audio pathway that can introduce delay, so I would suggest: • Start from one of our sample agents, and compare to what you are seeing with your agent: https://github.com/livekit-examples/agent-starter-python • Add logging metrics to understand the source of the delay, https://docs.livekit.io/agents/build/metrics/. There is also a dedicated section of our workshop that also handles this: https://livekit.worksh.app/tutorials/livekit-voice-agent/metrics-and-preemptive Once you have identified the main sources of delay, you can start to eliminate them by either changing your model providers, or tweaking their settings.