Description
When using Speech Note's active-window dictation mode with ydotool on Wayland (NixOS + niri compositor), transcribed text frequently contains doubled or repeated characters/words. For example, "hello world" might be typed as "hhello wworld" or words get repeated entirely.
Environment
- OS: NixOS 24.11+ (flake-based)
- Compositor: niri (Wayland, no X11/XWayland)
- Audio: PipeWire
- Speech Note: Flatpak (net.mkiol.SpeechNote) from Flathub
- ydotool: System ydotoold with socket at
/run/ydotoold/socket (0666 perms for Flatpak access)
- Model: Whisper (medium)
Steps to Reproduce
- Install Speech Note via Flatpak on a pure Wayland compositor (no XWayland)
- Configure ydotoold with accessible socket
- Grant Speech Note Flatpak access to ydotool socket via overrides
- Use
start-listening-active-window D-Bus action to begin dictation
- Speak a sentence and observe the typed output
Expected Behavior
Each character/word is typed exactly once.
Actual Behavior
Characters or words are duplicated. Appears to be a key-repeat race condition — ydotool may be sending key-down events without sufficient delay before key-up, causing the compositor to interpret them as repeated keys.
Possible Root Cause
The typing delay between keystrokes in ydotool integration may be too short for some Wayland compositors. A configurable inter-keystroke delay or using ydotool's type --delay flag could help.
Workaround
Using Handy (cjpais/Handy) instead, which uses evdev-based direct input (HandyKeys) and doesn't exhibit this issue.
Description
When using Speech Note's active-window dictation mode with ydotool on Wayland (NixOS + niri compositor), transcribed text frequently contains doubled or repeated characters/words. For example, "hello world" might be typed as "hhello wworld" or words get repeated entirely.
Environment
/run/ydotoold/socket(0666 perms for Flatpak access)Steps to Reproduce
start-listening-active-windowD-Bus action to begin dictationExpected Behavior
Each character/word is typed exactly once.
Actual Behavior
Characters or words are duplicated. Appears to be a key-repeat race condition — ydotool may be sending key-down events without sufficient delay before key-up, causing the compositor to interpret them as repeated keys.
Possible Root Cause
The typing delay between keystrokes in ydotool integration may be too short for some Wayland compositors. A configurable inter-keystroke delay or using ydotool's
type --delayflag could help.Workaround
Using Handy (cjpais/Handy) instead, which uses evdev-based direct input (HandyKeys) and doesn't exhibit this issue.