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:
10
voice.py
10
voice.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user