debug(voice): add VAD start/stop events to trace where audio pipeline breaks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-02-22 11:18:51 +02:00
parent f74a11fde8
commit 5d31886192

View File

@@ -355,7 +355,15 @@ class VoiceSession:
vad=_get_vad(),
)
# Debug: log speech events
# Debug: log speech pipeline events to pinpoint where audio is lost
@self.session.on("user_started_speaking")
def _on_speaking_start():
logger.info("VAD: user_started_speaking")
@self.session.on("user_stopped_speaking")
def _on_speaking_stop():
logger.info("VAD: user_stopped_speaking")
@self.session.on("user_speech_committed")
def _on_user_speech(msg):
logger.info("USER_SPEECH: %s", msg.text_content)