Repository navigation
Mark the words the model was unsure about, and learn Custom Words from corrections #2310
behdad-dot
started this conversation in
Ideas
Replies: 1 comment
|
I built part 2 of this (learning Custom Words from corrections) on Windows, as an opt-in setting:
Branch: https://github.com/radhepa/Handy/tree/learn-custom-words It doesn't do part 1 (confidence marks), so it learns from any correction, not only flagged words. Would a PR for this be welcome, Windows-only at first? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
After a dictation is pasted, nothing tells me which words the model was unsure of. I have to reread everything to find the one name it mangled. Custom Words help, but only for words I remembered to add in advance; I rarely do, so the same name gets misheard every time.
Proposed solution
Two small pieces, both built on data the model already produces.
1. Mark the words the model was unsure about. Parakeet TDT (and other transducer/CTC models) give a probability per token. Taking each word's least likely token as its confidence separates the two cases cleanly in my tests: correctly heard words scored 0.94 to 1.0, while misheard names scored 0.19 to 0.56, so a 0.6 threshold flags almost only real mistakes. Those words can then be shown:
GetCharacterExtentson Linux,AXBoundsForRangeon macOS, UI AutomationTextRange.GetBoundingRectangleson Windows) and drawing a translucent box over each one for a few seconds;2. Learn Custom Words from corrections (opt-in). While the marks are up, watch that text field: when the user retypes a flagged word into something that is not a dictionary word (
netbirttoNetBird), add it to Custom Words, with the misheard form as an alias. The list fills itself from the corrections the user makes anyway.Alternatives considered
Fit with Handy
Both pieces are optional, need no new model, and fail quietly (no accessibility access means no boxes). I know Handy is in a feature freeze; this is to see whether others want it.
I have a working prototype of both on GNOME Wayland (Python plus a small GNOME Shell extension, using Parakeet TDT 0.6B v3 int8 through onnx-asr). It works in GTK apps and in an Electron app once its accessibility tree is on; a VTE terminal exposes the same positions. Happy to share the code or measurements if useful.
All reactions