Repository navigation
Description
Problem
End-of-turn detection is purely temporal. If the user pauses to think mid-
sentence for longer than the silence tolerance, the turn is committed and the
agent answers a half-finished question.
Evidence
autobot-frontend/src/composables/useVoiceConversation.ts:110-124 —
_silenceMsToRedemptionMs() and _silenceMsToOffsetFrames() map the single
silence-tolerance knob onto Silero's redemption window and the AudioWorklet
silence frame count. Both are timers.
Nothing inspects the transcript text before committing the turn. The knob
(DEFAULT_SILENCE_THRESHOLD_MS = 800, #12505) can only trade "cuts me off" against
"waits too long" — it cannot tell the two situations apart.
Proposed approach — the cheap, high-value part only
Hold the turn when the utterance ends on a trailing function word — a word
that almost always means "I'm not finished": "to", "the", "a", "and", "but", "so",
"or", "of", "for", "with", "is", "are", "that", "because", "if", "when", "then",
"about", "into", "um", "uh".
On a match, extend the turn up to a bounded maximum hold before auto-committing,
so a genuine trailing "um" can never wedge the conversation.
This runs on text we already have from STT. No new model, no new service hop.
Known pitfall — do not strip digits first
Normalizing the utterance by removing numbers before taking the last word makes
"set it to 250" end on the filler "to" instead of "250", so a complete sentence
looks unfinished and the turn stalls. Keep digits when determining the final word.
Explicitly out of scope
A dedicated semantic end-of-turn model is deliberately not proposed here.
Our STT runs server-side, so there is no in-renderer model worker to host one — it
would mean a new model deployment on the worker VM plus an extra network hop
inside the turn path. The added latency and operational load plausibly cancel the
accuracy gain in our topology. If the heuristic proves insufficient in practice,
re-open that question with measurements.
i18n
The word list is language-specific. Key it per language and no-op for languages
without a list, rather than applying an English list globally.
Acceptance criteria
- Pure, unit-tested predicate (no browser deps) in
utils/ - Bounded maximum hold — a trailing filler can never stall the turn indefinitely
- Digits preserved when determining the final word (explicit test:
"set it to 250" commits, "set it to" holds) - Keyed per language; unknown language → no hold
- Interacts correctly with the existing silence-tolerance knob (voice/STT: input cuts off on a brief pause — Silero redemptionMs=250 + AudioWorklet OFFSET_FRAMES=8 (~21ms) too short, and silenceThreshold=1500 is dead config #12505) and
the TTS-echo cooldown (Bug: Chat messages disappear after polling + Voice conversation echo loop #1371)
Activity
mrveiss commentedon Jul 31, 2026
Parent: #13096 (capability audit umbrella).
github-actions commentedon Oct 28, 2026
needs-structurecleared: goal milestone, matching phase label and native parent (or sub-issues) are all present (#19522).