magnificent-dusk-62723
12/29/2025, 2:53 PMtall-airline-16756
12/29/2025, 2:53 PMtall-airline-16756
12/29/2025, 2:53 PMsilero.VAD.load()), attach a handler to its metrics_collected event, and use that VAD in your AgentSession. The VAD emits vad.VADEvent objects with speech start/stop, idle time, inference timing, etc.
Example:
vad = silero.VAD.load()
def on_vad_event(event: vad.VADEvent):
asyncio.create_task(handle_vad(event))
vad.on("metrics_collected", on_vad_event)
session = AgentSession(stt=..., llm=..., tts=..., vad=vad)
• Higher-level conversation state: AgentSession emits user_state_changed events (part of the turn-taking logic). You can listen for ev.new_state == "speaking" and ev.new_state == "listening" to know when a participant starts/stops speaking (this uses VAD internally).
Example:
@session.on("user_state_changed")
def on_user_state_changed(ev: UserStateChangedEvent):
if ev.new_state == "speaking":
print("User started speaking")
elif ev.new_state == "listening":
print("User stopped speaking")
Which approach do you want to use — raw VAD metrics or the higher-level user state events? If you share a short snippet of how you initialize your agent/session, I can show the exact code to wire it into your setup.
Sources: VAD Metrics | LiveKit docs | Turns overview | LiveKit docs