rohitsar567 Claude Opus 4.7 (1M context) commited on
Commit
4c6215a
·
1 Parent(s): d89a871

fix(voice): KI-064 — silence-end window 90 → 120 (~1.5 s → ~2 s)

Browse files

User: "cut off and submitted before the last word" after saying "Hi, I'm
looking to buy a new insurance ...". KI-060's 1.5 s was still tight enough
to swallow the natural thinking pause before "policy" / "plan".

Bump to 120 frames (~2 s). Trade: ~0.5 s extra tail latency before the
bot starts responding, but no more dropped tail words. Single config
change in DEFAULTS; opt-overridable via opts.silenceEndFrames.

History of this knob:
v1 (KI-057, 2026-05-15): 40 frames (~640 ms) — too tight.
v2 (KI-060, 2026-05-15): 90 frames (~1.5 s) — still cut "insurance .. policy".
v3 (KI-064, 2026-05-15): 120 frames (~2 s) — covers normal thinking pauses.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

frontend/src/lib/useLiveConversation.ts CHANGED
@@ -95,13 +95,14 @@ const DEFAULTS = {
95
  // don't open a segment. KI-044's preroll buffer still captures the
96
  // first phoneme since we look back 300 ms.
97
  speechStartFrames: 3,
98
- // KI-060 (2026-05-15) — bumped 40 → 90 (~1.5 s of silence) so a
99
- // natural mid-sentence pause doesn't auto-close the segment.
100
- // After KI-057 made noise correctly NOT keep the segment alive,
101
- // the underlying silence-end timer was exposed as too aggressive —
102
- // users reported that pausing for ~1 s between phrases caused the
103
- // bot to submit prematurely.
104
- silenceEndFrames: 90,
 
105
  minUtteranceMs: 400,
106
  // KI-044 — How much pre-trigger PCM we keep in the rolling buffer.
107
  // 300 ms is generous; covers the ~80 ms VAD latency + ~100 ms of
 
95
  // don't open a segment. KI-044's preroll buffer still captures the
96
  // first phoneme since we look back 300 ms.
97
  speechStartFrames: 3,
98
+ // KI-060/064 (2026-05-15) — silence-end window tuning.
99
+ // v1 (KI-057): 40 (~640 ms) too tight; users said pause→submit.
100
+ // v2 (KI-060): 90 (~1.5 s) still cut "Hi, I'm looking to buy a
101
+ // new insurance ..." before "policy".
102
+ // v3 (KI-064): 120 (~2 s) covers a normal thinking pause between
103
+ // phrases. Trade: ~0.5 s extra tail latency before the bot
104
+ // responds, accepted by the user.
105
+ silenceEndFrames: 120,
106
  minUtteranceMs: 400,
107
  // KI-044 — How much pre-trigger PCM we keep in the rolling buffer.
108
  // 300 ms is generous; covers the ~80 ms VAD latency + ~100 ms of