Summary
The silenceTimeout row in the Vocal component API table (README.md:277) states the session stops "after this many ms of inactivity following the last recognized result." The implementation arms the silence timer on the speechend event, not on a recognition result.
Current state
The silence timer is started in _onSpeechEnd (src/components/Vocal.tsx:239: if (continuousRef.current && (silenceTimeoutRef.current ?? 0) > 0) startSilenceTimer()), cancelled on speechstart, on session start, and on end. _onResult never arms it. The adjacent comment (Vocal.tsx:236-238) explains why: in continuous mode @untemps/vocal intercepts intermediate result events and _onResult only runs once on the aggregated end-of-session event. Because result effectively fires only once at session end, describing the anchor as "following the last recognized result" misrepresents the mechanism — a reader could expect the timer to reset on per-segment results.
Proposed improvement
Reword the silenceTimeout description to reflect the speechend anchor, e.g.: "automatically stop the session after this many ms of silence following the last detected speech (the speechend event)."
Summary
The
silenceTimeoutrow in theVocalcomponent API table (README.md:277) states the session stops "after this many ms of inactivity following the last recognized result." The implementation arms the silence timer on thespeechendevent, not on a recognitionresult.Current state
The silence timer is started in
_onSpeechEnd(src/components/Vocal.tsx:239:if (continuousRef.current && (silenceTimeoutRef.current ?? 0) > 0) startSilenceTimer()), cancelled onspeechstart, on session start, and onend._onResultnever arms it. The adjacent comment (Vocal.tsx:236-238) explains why: in continuous mode@untemps/vocalintercepts intermediateresultevents and_onResultonly runs once on the aggregated end-of-session event. Becauseresulteffectively fires only once at session end, describing the anchor as "following the last recognized result" misrepresents the mechanism — a reader could expect the timer to reset on per-segment results.Proposed improvement
Reword the
silenceTimeoutdescription to reflect thespeechendanchor, e.g.: "automatically stop the session after this many ms of silence following the last detected speech (thespeechendevent)."