diff --git a/bot.py b/bot.py index 45ebae4..5243b8f 100644 --- a/bot.py +++ b/bot.py @@ -730,11 +730,18 @@ async def run_agent(transport, caller_number=None, call_sid=None, do_capture=Tru ) ) ] + # VAD start: interruptions OFF — raw VAD fires on breaths/noise with no transcript and + # used to silently cancel queued replies (20-35s dead air). Transcription start: + # interruptions ON — only REAL transcribed caller speech may cancel a stale queued + # reply. Noise can't produce a transcript, so the dead-air bug can't return; but when + # the caller keeps talking as a reply starts (live call 2026-07-04: "this is Carlos" / + # reply starts / "How are you doing today?"), the outdated reply is cancelled instead + # of both replies playing back-to-back. user_params = LLMUserAggregatorParams( user_turn_strategies=UserTurnStrategies( start=[ VADUserTurnStartStrategy(enable_interruptions=False), - TranscriptionUserTurnStartStrategy(enable_interruptions=False), + TranscriptionUserTurnStartStrategy(enable_interruptions=True), ] if HALF_DUPLEX else None, # None -> library defaults (interruptions on) stop=stop_strategies, ),