Repository navigation
Dictation: typing is the wrong model for multilingual users — suggest clipboard as the voxtype default #7028
Replies: 2 comments
|
Confirming this on Omarchy 4 / Hyprland 0.56.2 with German dictation — and one detail that narrows it further: only uppercase letters break. wtype maps the n-th distinct character to keycode n+8 (
The likely reason is flagged in wtype's own source, right above the line in question: // TODO: Is including "complete" here really a good idea?
fprintf(f, "xkb_types \"(unnamed)\" { include \"complete\" };\n");With the complete xkb types, a key whose only keysym is an uppercase letter gets type The practical consequence for German (or any language that capitalises nouns) is that the lost character is almost always the first letter of a noun: uppercase letters both appear late in a sentence for the first time and are the only ones that break. Two notes for anyone debugging this:
Switched to |
|
Small follow-up on a side effect of the clipboard route that is easy to miss if you run a clipboard history manager — Omarchy does, via
Second point, worth considering upstream: voxtype does not mark its clipboard content as sensitive, so every dictation is stored in plain text in the history. Omarchy's |
Uh oh!
There was an error while loading. Please reload this page.
Omarchy ships voxtype with
mode = "type", so dictation is delivered as synthetic keystrokes. That works well in English and fails silently the moment you speak more than one language. I'd like to suggest clipboard output as the default instead, and the argument is about the model rather than about any particular driver being buggy.A keyboard is a codec, not a channel for text
A keypress does not carry a character. It carries a position, and only a layout turns that position into a character. So typing performs an extra round trip —
text → keystrokes → text— which is only lossless if sender and receiver agree on a layout.Dictation already has the text. Routing it through a keyboard adds an encoding step that can only lose information.
One layout at a time; sentences are not
Two scripts inside one sentence. No XKB layout contains both, so no layout-switching strategy — per session, per language, even per utterance — can express it. A perfect language-detection feature would still have to pick one script and mangle the rest.
This isn't an edge case. Code-switching is normal for most non-English speakers, and technical vocabulary stays in English almost everywhere.
Every
typedriver hits the same wall from one of two sidesA driver can either adopt a layout, or invent one. Both fail here:
/dev/uinput, compositor applies the system layoutuslayout/dev/uinput+ assumed XKB layoutMeasured on Hyprland 0.56.2 with the same 742-character Russian/English sentence.
The point is that these fail for unrelated reasons. Fixing wtype would not help, because ydotool, dotool and eitype break on the layout assumption instead. It is the model that doesn't fit, not the implementation.
For completeness, the current default also has a concrete defect today: wtype assigns one keycode per distinct character starting at 9, and those collide with BackSpace, Tab, Ctrl, Shift and the F-keys, so any text with more than ~13 distinct characters loses letters. Details and reproduction: atx/wtype#71. Upstream's last commit is from 2022, so this is unlikely to be fixed there.
Why this is rarely reported
Shipped defaults are
model = "base.en"andlanguage = "en". English-only dictation rarely accumulates enough distinct characters to trip the collisions. Anyone switching to a multilingual model — which Omarchy supports and the config invites — hits it immediately, and the failure is silent: no error, just missing characters.Suggested change
with a small
bin/omarchy-voxtype-pasteissuing one paste through Hyprland's own key injection — the same mechanismdefault/hypr/bindings/clipboard.luaalready uses for Universal paste, whose comment already says why a virtual keyboard is the wrong tool:Following #6892,
Ctrl+Shift+Vlooks like the right single chord — verified there to paste in both GUI applications and terminals, avoiding theShift+Insert/Firefox problem. This matches the helper-script +post_output_commandpattern already established by #6589.Verified locally: exact output in both Obsidian and foot, versus corruption in every
typedriver.Tradeoffs, and one conflict worth naming
restore_clipboardexists but needs care not to race the paste; the clipboard manager also makes it recoverable.Pasting is also length-independent, which sidesteps a related problem: at uinput-level key delays, a long dictation takes ~30 seconds to type out.
System details
[claude-opus-5] on behalf of hoblin
All reactions