Skip to content

feat(dictation): cleanup v2.1 post-tagger rules and 128-term sublinear vocabulary bias - #3069

Merged
kitlangton merged 1 commit into
devfrom
ship1-cleanup-v21-vocab
Nov 28, 2026
Merged

kitlangton merged 1 commit into
devfrom
ship1-cleanup-v21-vocab

Conversation

@kitlangton

Copy link
Copy Markdown
Collaborator

Dictation keeps spoken a.m./p.m. across time corrections, joins compound terms on screen, and biases short technical words without false triggers.
Clean up what I say v2 now preserves spoken meridiems deleted in a time self-correction, joins 2-3 word spans that match active mixed-case or kebab-case vocabulary and screen terms, and aligns a 1-edit email surname to an explicit full name spoken in the same dictation. Parakeet's vocabulary cap rises from 64 to 128 terms with sublinear SentencePiece bonuses and screen- or spelling-corroborated 3-4 letter matching.

💡 Why
Saying "10 a.m., sorry, 10:30" dropped "a.m." with the corrected phrase, compound package names on screen (FastAPI, react-query, date-fns) arrived split across spaces, and Parakeet's 64-term linear bonus starved screen terms behind larger vocabularies while under-boosting single-piece words.

🆕 Now you can

  • Correct a spoken time without repeating a.m. or p.m. ("10 a.m., sorry, 10:30" becomes "10:30 a.m.", never inventing a meridiem when none was spoken).
  • Dictate mixed-case and technical kebab-case identifiers visible in the focused window or saved in Vocabulary (CloudSync, react-query, date-fns) and have split words joined automatically.
  • Keep first.last@domain email handles consistent when First Last is spoken in the same dictation, and bias up to 128 vocabulary + screen terms in Parakeet with 3-4 letter acoustic matching gated to corroborated terms.

🚦 How it ships
Cleanup rules run inside Labs › Clean up what I say v2 (off by default); screen corroboration runs when Labs › Words on screen is on, and Parakeet's 128-term sublinear bias applies whenever Vocabulary boost is active.

- Parakeet bias: first 64 terms, linear 1.5 * n_pieces bonus, >=5-letter fuzzy match only
+ Parakeet bias: first 128 terms, sublinear 2.8 + 1.0 * (n_pieces - 1) bonus, 3-4 letter fuzzy match when on screen or in sounds_like
- Cleanup v2: render(words, tags) -> drop meridiem inside deleted time correction, leave split compounds
+ Cleanup v2: render_v21(words, tags) -> carry spoken meridiem to bare H:MM repair -> join active compounds -> align 1-edit email surname

📊 Numbers: evaluated across held-out dictation, clean read/conversational speech, safety, and multi-domain test suites on Apple Silicon

Benchmark Before After
Held-out dictation exact match (151 clips) 66.9% (101/151) ✅ 69.5% (105/151, 0 broken)
Clean speech false triggers (400 clips) 0/400 (7.94% WER) ✅ 0/400 (7.94% WER)
Cleanup safety suite serious failures (159 cases) 0/159 ✅ 0/159
Unseen multi-domain public test WER (180 clips) 9.91% ✅ 9.91% (+0.00 pp)

The new unit tests in cleanup::v2::post::tests, screen_vocabulary::tests, and vocabulary::tests fail without the change (694 tests run across dictation and vocabulary).

👀 Read: src/dictation/cleanup/v2/post.rs and src/dictation/cleanup/v2/render.rs — render stays frozen for the 640 recorded Round 4 parity cases while render_v21 tracks deleted correction spans so only a spoken clock meridiem directly preceding a bare 12-hour repair is carried forward. The rest is routine.

🔍 From dictation error analysis · no user reports · measured with transcribe-cli and the Core ML v2 tagger on macOS

Checks run
  • scripts/check dictation::: 584 passed
  • scripts/check vocabulary: 93 passed
  • scripts/check rune_ui::vocabulary::tests: 17 passed
  • cargo clippy --locked --bin hex -- -D warnings: 0 warnings
  • python3 scripts/code-shape.py: 0 hard problems
  • python3 scripts/check-nix-git-pins.py: 14 passed, 3/3 pins match

@kitlangton
kitlangton merged commit 6e3bddd into dev Nov 28, 2026
4 checks passed
@kitlangton
kitlangton deleted the ship1-cleanup-v21-vocab branch November 28, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant