Repository navigation
Recording cap: a latched recording runs up to an hour - #122
Merged
Merged
Conversation
The 10 min cap is there for a held key whose key-up is lost, but it also ended hands-free recordings at 600 s, with the stop sound and a paste, in the middle of a dictation meant to be that long. A held recording keeps 10 min; one latched by the time the held cap is reached runs to 60 min, asked then because a hybrid key latches at its release. The engine's copy of the audio for the live pass now keeps only its last window or two, so an hour leaves no 230 MB buffer behind. A 60 min fixture paced in leaves 0.206 s at release against 0.179 s at 10 min, with the text identical to the whole-buffer pass (docs/BENCHMARKS.md, "Past ten minutes"). Co-Authored-By: Claude Opus 5.5 <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.
The problem
It is the 10 min recording cap. The app's log has a hands-free recording that started at 06:40:07 and ended at exactly 06:50:07,
audio 600.0 s. The cap is there for a held key whose key-up is lost, but it also ends a latched recording, which has no key-up to lose, so a dictation meant to be that long is cut off with the stop sound and pasted.The fix
A held recording keeps the 10 min cap. A recording that is latched by the time the held cap is reached runs to 60 min (
DictationCoordinator.latchedMaximumDuration); it is asked then and not at the press, because a hybrid key latches at its release. The engine's copy of the audio for the live pass now keeps only its last window or two, cut on whole hops so the live window lands where it did, so an hour-long dictation leaves no 230 MB buffer behind. CLAUDE.md, ARCHITECTURE, USAGE and BENCHMARKS say the new caps.How it was proved
swift test: all suites pass.theCapFiresInToggleModebecameaLatchedRecordingOutlastsTheHeldCap: still recording past 10 min, recording 1 s before 60 min, pasted with no send at 60 min. With the latch check switched off it fails; the held-cap test is unchanged and passes.check-doc-pointers.shandcheck-site-numbers.shpass.bench --paced --runs 3 --pause 5, the bench's sleep removed locally so the audio fed as fast as the windows ran (not committed):endUtterance(median)Critical path: nothing between
recordingStoppedandinsertedchanged. The trim is infeed, which runs while the key is held, roughly every 10 s, a ~1 MB move; the release waits on it only if it lands in the last chunk. No before-and-afterbench --pacedrun of the full fixture set.Not proved: a real latched recording past 10 min in the app (needs synthetic hotkeys or an hour of the developer's time), and the live transcript's text after a trim.
Not in this PR
The capped dictation's clipboard was read 3.0 s after Cmd+V, where every other dictation reads in about 0.01 s, so the automatic paste may not have landed. Not reproduced; worth a look if it happens again.
🤖 Generated with Claude Code