Harden dictation cancellation and streamline audio-to-text processing - #1722
Draft
r3dbars wants to merge 3 commits into
Draft
Harden dictation cancellation and streamline audio-to-text processing#1722r3dbars wants to merge 3 commits into
r3dbars wants to merge 3 commits into
Conversation
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
Canceling dictation could leave queued transcription waiting, allow old save/conversion work to mutate a newer session, or let pasteback continue after cancellation. Model readiness deadlines also did not bound every suspended wait. This change makes those operations respect session ownership and cancellation while preserving durable saves and serialized native inference.
Product Impact
What changed
How I checked it
dc79a16aa4a7, explicitly confirming Bluetooth dictation and Auto Enter, then reporting ordinary copy/paste and overall behavior working well and feeling faster/more reliable. This is positive local testing, not an exhaustive Bluetooth/Zoom/device matrix.The final verification commit
e7b86768differs from the tested app revision only by the worker test scheduling correction; production app sources are identical.Synthetic production-path benchmark: five fixtures, three iterations each, with no real microphone or target-app paste. The candidate's stop-to-text medians were 64/99/160/344 ms for 3.9/10.9/36.5/111.8-second clips. All 12 spoken cases saved and all three silence cases stayed empty. Normalized spoken words matched the released build in all 12 runs; the long fixture differed only in punctuation/case normalization. Loaded-host measurements do not establish a guaranteed speedup or general recognition accuracy.
Risk Review
Remaining caveats
Cold startup is variable. The final build's startup budget stage measured 3,486 ms against the unchanged 3,000 ms limit, although compilation, signing, and UI smoke passed. Isolated candidate repeats measured 4,291/2,679/2,682 ms; the existing budget checker passed against the final repeat. The packaged release measured 911/770/713 ms. Packaging/signing/symbol differences mean this does not isolate a source-code regression, and passing repeats do not erase the slower observations. Cold-launch consistency remains open; this PR is not a release-readiness declaration.
Antialiasing intentionally adds a small conversion cost (about 1.81 ms for 10 seconds and 73.88 ms at the five-minute cap in an isolated optimized benchmark). It is a signal-quality safeguard. Actual Zoom coexistence, Bluetooth route changes, and diverse target-app behavior still benefit from broader hardware trials.
Workpad: dictation hardening scope and trial contract.
Agent handoff
COORD_DONE: BRIEF | this PR | dictation ownership, cancellation, conversion, cleanup, and timing hardening | no cleanup | review cold-launch caveat before release | functional suites passed; owner trial positive | lanes used: Codex=implementation and independent review; Claude/Local/Windows=skipped, no distinct proof added | review the diff and hosted checks