Repository navigation
fix(voice): honest, bounded voice-input lifecycle with interim text (5.4.2) - #104
Merged
Merged
Conversation
Owner hand test (Chrome 155, on-device): English works, Chinese shows "Listening..." and nothing appears, with no error. The hook made every failure silent: it claimed to listen before audio capture, ignored interim results, went quietly idle on an empty end and had no deadline. - ready after pack install (no auto-open); starting until audiostart; stopping while awaiting finals. - interimResults on: an ephemeral per-index preview; finals appended once; unfinalized speech goes to the answer box on end, stop timeout or a non-terminal error (never sent automatically). - empty end, nomatch or no-speech -> noText; a foreign aborted -> interrupted (mic stays available); self-aborts are suppressed. - 8 s startup deadline, 10 s stop grace, no overlapping sessions, timers cleared on every terminal path. - processLocally fail-closed checks unchanged; no cloud fallback. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…x languages New statuses (ready, starting, noText, interrupted) in all six dictionaries; a muted live preview tagged with the recognition language; Send and Cmd/Ctrl+Enter held while starting/listening/stopping and released on every terminal path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Kimi review of the lifecycle change (no blockers): - zh/ja dictated text is joined without spaces, both interim fragments and successive finals appended to the answer (the latter predates this branch). - While stopping, the mic button keeps "Stop" and aria-pressed, disabled. - The live preview is no longer an aria-live region (it re-announced the whole growing text on every result). - A terminal device error keeps already-recognized interim text, like every other error path. - zh "preparing" uses the CJK ellipsis like the other zh voice strings; unused onspeechstart removed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Chrome captures no audio while its "Allow microphone" prompt is open, so a participant who read it for more than 8 s got a false "could not be turned into text" on first use (side-agent review). The deadline now waits for navigator.permissions to report microphone 'granted' (immediately, or via onchange); without the Permissions API there is no deadline and Stop still releases the session. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Owner hand test (Chrome 155, on-device voice): English works; Chinese shows "Listening…", the owner speaks, nothing appears, no error. Root-cause investigation (Codex reading Chromium source, Kimi reading our code, lead verified):
zh-CN→ thecmn-Hans-CNpack in the recognition path,components/soda/constants.cc+speech_recognition_recognizer_impl.ccResetSoda(), checked at main/157, not the exact 155 tag).What changes
audiostart; stopping while finals arrive.interimResultson: a live, local-only preview (not stored, not sent, not an aria-live region); finals appended once; unfinalized speech goes to the editable answer box on end / stop timeout / non-terminal error (never auto-sent).nomatch,no-speech→ "No text was captured"; a foreignaborted→ "stopped unexpectedly" (mic stays available).navigator.permissionsreports the microphone granted, so a slow "Allow" click is not an error; 10 s stop grace; no overlapping sessions; timers cleared on every terminal path.processLocallyfail-closed checks unchanged; no cloud fallback.Review
Verification
npm run check:cloudflare20/20 on b41bc02 (Node 24.19).🤖 Generated with Claude Code