Description
Problem
In a streaming reply, the first audio does not start until a complete,
terminated sentence of at least 20 characters exists. Everything before that is
silence. The perceived difference is "talks as it thinks" versus "long pause, then
a wall of speech".
Evidence
autobot-frontend/src/utils/ttsSentences.ts:33-49 — extractCompleteSentences()
only ever emits on the terminator pattern (?<=[.!?])\s+, and only when
candidate.length >= minChars.
autobot-frontend/src/components/chat/ChatInterface.vue:1301,1325 — the caller
passes _MIN_TTS_SENTENCE_CHARS = 20 for every chunk. There is no lower bar
for the first one.
Proposed approach
Release the opening chunk of a reply on a weaker signal, then raise the bar
for everything after:
- first chunk: emit at an early clause boundary (
,;:—–), or —
for a long opening sentence with no early pause — at a word boundary once a
minimum length is reached - subsequent chunks: keep the current terminated-sentence +
minCharsrule
The fast path must only fire when nothing is already held for merging, so the
opening never jumps ahead of an earlier short sentence waiting to be merged.
Risk — must be validated by listening, not just by test
A too-short opening fragment can render with a noticeably different timbre
from the rest of the reply, producing a "the voice changes mid-sentence" artifact.
The safe minimum is model-specific and must be measured against our own TTS worker
(autobot-tts-worker, Kani-TTS-2) — a threshold that works for one model does not
transfer to another.
If the artifact cannot be avoided at any useful length, close this as
not-worth-doing and record the measured finding, rather than shipping a latency
win that costs audio quality.
Acceptance criteria
- First chunk released at a clause or word boundary below the standard bar
- Subsequent chunks unchanged
- Fast path suppressed when a short sentence is already held for merging
- Cursor accounting still advances by the exact consumed span (no drift —
the bug fixed in fix(voice): assistant text dropped/truncated — fallback aborts prior audio + cursor drift + tail not flushed #12502 must not regress) - Listening test against our TTS worker recorded in the issue, with the
chosen minimum length and its measured justification
Activity
mrveiss commentedon Jul 31, 2026
Parent: #13096 (capability audit umbrella).
feat(voice): release a reply's opening chunk at a clause or word boun…
feat(voice): a listening-test harness renders TTS fast-start candidat…
chore(ratchet): ChatInterface.vue shrank to 1521 lines; lower its cei…
docs(voice): the listening-test harness is documented and writes to t…
mrveiss commentedon Oct 19, 2026
Landed through merge train 34 (#18859, merge 7891503). #17972's reviewed head 1a1edaa is an ancestor of main. Evidence from
git show origin/main:<path>, inautobot-frontend/src/utils/__tests__/ttsFastStart.test.ts:releases the opening at a clause boundary below the standard bar(:31) andfalls back to a word boundary for a long opening with no early pause(:41). ThresholdsOPENING_CLAUSE_MIN_CHARS= 16 andOPENING_WORD_MIN_CHARS= 48, inttsSentences.ts.speaks the opening early, then only terminated sentences(:78): after the opening, a clause boundary alone releases nothing.stays out of the way once any sentence has terminated(:69): "Hi there." (under the bar) is held, andextractOpeningChunkreturns null.advances the cursor by the exact consumed span — no drift(:102, steps 1/3/7/50): spoken + remainder == the full text.OpeningThresholds). The harness that renders candidates for that listening test ships asautobot-frontend/scripts/tts-listening-test.mjs, documented indocs/guides/VOICE_INTERFACE_SETUP.md. This item stays open until someone runs it and records the pick.github-actions commentedon Oct 28, 2026
needs-structurecleared: goal milestone, matching phase label and native parent (or sub-issues) are all present (#19522).