billions-lawyer-8588
08/12/2025, 3:50 PMtall-airline-16756
08/12/2025, 3:50 PMtall-airline-16756
08/12/2025, 3:51 PMPipelineEOUMetrics
interface. It has this handy endOfUtteranceDelay
property that shows the time between when speech ends (detected by VAD) and when the agent decides to wrap up the user's turn.
Here’s a simple way to get to it:
1. Metric Collection: The endOfUtteranceDelay
pops up as part of the EOUMetrics
right before the agent plays speech back to the user. Just listen for the METRICS_COLLECTED
event to grab this info.
2. Example:
def eou_metrics_wrapper(metrics: EOUMetrics):
eou_delay = metrics.end_of_utterance_delay # Here's the delay
transcription_delay = metrics.transcription_delay
# Do whatever you need with these metrics
agent.eou_metrics_event.subscribe(eou_metrics_wrapper)
This way, you can easily capture and use the EOU delay for any analysis or processing you have in mind.
If you want to dive deeper, check out the LiveKit documentation on metrics and the Python examples repository. They’ve got some great info to help you along!
Sources: Capturing metrics | LiveKit Docs | complex-agents/turn-taking/agent.pybillions-lawyer-8588
08/12/2025, 5:08 PMtall-airline-16756
08/12/2025, 5:08 PMend_of_utterance_delay
and transcription_delay
, by subscribing to the eou_metrics_collected
event on the STT component.
Here’s a little example to get you started:
def eou_metrics_wrapper(metrics: EOUMetrics):
asyncio.create_task(self.on_eou_metrics_collected(metrics))
stt.on("eou_metrics_collected", eou_metrics_wrapper)
These metrics come from the EOUMetrics
interface and you can log or analyze them however you like. If you want more details or another example, just give me a shout—I’m here to help!
Sources: PipelineEOUMetrics | LiveKit Agents | metrics/metrics_stt.py | livekit-agents/livekit/agents/voice/agent_session.py