Repository navigation
fix: long dictations no longer lose words after a pause or at the 13s window seam - #307
Conversation
… window seam FluidAudio 0.15.5 -> 0.15.7. The batch path now repairs seam gaps (FluidAudio #761), end-aligns the final window (#800), keeps merge token order (#830) and uses silence-aligned window starts on v3 (#869). Re-decoded the 7 flagged clips from 09-06 to 09-11 that lost a tail or a middle: 7/7 come back whole. On a 90-clip sample since 09-09: 69 same, 1 longer, 1 shorter, 15 differ by a word or two, all on clips over 16s; every clip under 12s decodes the same. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Nathan Zylbersztejn <[email protected]>
The long-pause retry closes the pause and decodes the clip again, then had to say everything the first pass said before it could be taken. Under FluidAudio 0.15.7 the windows sit elsewhere, so the retry's decode of the opening differs more often and the guard refused tails that were real. Measured today on parrotflow-2026-09-11T11-58-59-4DCBA9FA.wav. The only difference was notation: the first pass wrote "seventy-one percent", the retry wrote "71%". `extends` compares on letters and digits, which leaves "71" against "seventyonepercent", so the prefix test failed and "will engage gently" was thrown away with it. The retry is no longer taken or dropped whole. The first pass keeps its text and its tokens exactly, and only the retry's words that start after the first pass stopped and that the gate heard speech at are appended. `extends` stays for the padded arms, which are still all-or-nothing. The spliced tail takes a capital when the first pass ended on a full stop. The retry read the closed-up pause as one sentence and wrote its first word lowercase; on the recording that pause is 8s or more of silence. Over 140 live dictations with an internal pause above 8s: the splice fires on 5, recovering 18 words. Three come back exactly as the 0.15.5 build delivered them, two recover a tail 0.15.7 had lost. No seam repeats a word. The other 135 are untouched by this. The 7 clips the bump fixed decode unchanged and the retry does not fire on any of them. Signed-off-by: Nathan Zylbersztejn <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Automatic reviews are disabled for this repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe package now requires FluidAudio 0.15.7. Long-pause retries preserve the original transcript prefix and append only recovered tail words when speech boundaries and token alignment are valid. The recovery logic recalculates confidence, restores sentence-start capitalization, and records unrecoverable rewrites for diagnostics. Documentation describes prefix validation and the eight-second pause threshold. Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The update preserves original transcript prefixes and appends only validated recovery tails; no current merge-blocking risk was identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dictations longer than about 13s lost words after a pause: the end of a sentence, or a clause in the middle. Ten dictations were flagged for this between 09-06 and 09-11, and about 1% of all dictations show the same signature in the trace. The words were already missing from the recogniser's first pass, so no transform could put them back.
This bumps FluidAudio from 0.15.5 to 0.15.7. The library now repairs the gaps at its own window seams and starts windows at silence, so the first pass keeps those words. All seven flagged clips that lost a tail or a middle decode whole with the bump alone. No app code needed to change for that.
The second commit keeps the app's own long-pause retry working under the new library. Its old acceptance rule swapped in the whole retry, but only when the retry's opening matched the first pass letter for letter. Under 0.15.7 the retry decodes the opening a little differently more often, so a recovered tail was thrown away with it. The retry now splices only its tail onto the first pass. The first pass's own text and tokens stay exactly as they were.
A reviewer should check
splicingTailinTranscriber.swift: the run of words it takes, the word-start guard, and the capital it adds after a full stop.Why the words went missing — the decoder stopped a second after each 12.88s window seam
Above 15s FluidAudio's batch path decodes 14.88s windows on a 12.88s stride. On every flagged clip the last decoded word ended 0.3 to 1.8s after a seam, then nothing, although the VAD heard speech for several more seconds. One clip lost a clause in the middle the same way. Re-decoding the seven clips from disk reproduced every loss. Cutting their pauses to 0.4s before decoding brought all seven back, and moving one 2.1s pause by 0.1s was enough on its own, so the seam was the cause, not the audio.
The app's retry for this (
closeLongPauses) never ran on any of them: it waits for a pause over 8s, and the longest pause in the seven is 4.9s.FluidAudio 0.15.6 and 0.15.7 target exactly this on the batch path: seam-gap repair (#761), end-aligned final window (#800), merge token order (#830), silence-aligned window starts on v3 (#869). All on by default. The app builds
AsrManagerwith the default config, so nothing else changes.Measurements — 7 of 7 flagged clips recovered, 30 of 30 short clips unchanged
The seven flagged clips, re-decoded from disk with the 0.15.7 build (
--transcribe, scratch config): all seven come back with the words the speaker reported, for example "possible resulting sentences", "in the natural language package", "banner dismissed", "into complex analysis".A sample of 90 live dictations since 09-09, raw first-pass text against the live record:
Every differing clip is over 16s. All 30 clips under 12s decode identically, so the single-window path is untouched. Decode time median is unchanged; the longest went from 0.2s to 0.96s.
The app's other repairs were re-run against their own archived case sets under 0.15.7 and each still fires: 46 of 46 empty-decode clips are still empty on the first pass (the pad recovers 31), and 47 of 56 invented-ending clips still get an invented ending on the first pass. None was removed.
The retry splice — fires on 5 of 140 long-pause clips, recovers 18 words, changes nothing else
On the clip that showed the problem (10s pause, "will engage gently" lost), the two decodes differed by one number's notation: "seventy-one percent" against "71%". The letters-and-digits prefix test failed and the tail went with it.
splicingTailtakes the retry's words that start after the first pass's last word and inside a VAD segment (0.3s margin over the VAD's own 0.75s hangover), as one contiguous run, and appends them. It refuses when the first taken token has no word-start mark, so text and tokens keep agreeing on word count. Confidence is recomputed from the joined tokens aswithoutInventedTaildoes. When the first pass ended on a sentence mark, the tail gets a capital.Every second archived live dictation with a pause over 8s, the population where the retry runs: 140 clips. The splice fired on 5 and recovered 18 words. Three match what the old build delivered live; two gain words the live delivery never had ("view transforms", "I came back to French transport"). The other 135 are untouched by the change. The seven flagged clips still decode exactly as with the bump alone; the retry does not fire on them.
extendsstays for the padded second-opinion arms, which are still taken or dropped whole.What this does not fix
🤖 Generated with Claude Code