Fix typing tool fallback and server reliability#9
Merged
Conversation
…ak (#7) Each ydotool invocation without ydotoold creates a kernel virtual input device that persists until reboot. Add auto-detection fallback chain (wtype → ydotool+daemon → xdotool → ydotool with warning) configurable via TALKTYPE_TYPE_CMD, matching the existing ffmpeg/pw-record pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dge cases - Add pgrep mock for deterministic tests (default: no ydotoold running) - Add test for ydotool+daemon detection path - Add test for bare ydotool warning (once-per-session) - Error explicitly if auto-detection finds no typing tool - Update line counts in CLAUDE.md and README.md - Update architecture description in CLAUDE.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
wtype can be installed but fail at runtime if the compositor doesn't support virtual-keyboard-unstable-v1 (e.g. GNOME). Change auto mode to actually try each tool and fall through on failure, rather than just checking if the binary exists. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bare ydotool without ydotoold leaks kernel input devices that can crash the system. Auto mode now only uses safe tools (wtype, ydotool+daemon, xdotool) and errors with clear instructions if none work. Users can still opt in to bare ydotool via TALKTYPE_TYPE_CMD=ydotool. Also remove Parakeet backend from README (CTC model outputs lowercase without punctuation, not useful for typing). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On GNOME Wayland, wtype fails (no virtual-keyboard protocol) and xdotool fails (X11 events ignored by Wayland apps). Bare ydotool is the only working option. Testing shows ydotool 0.1.8-3build1 cleans up its virtual input devices, so allow it as a last resort with a once-per-session warning about the potential device leak. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
xdotool sends X11 key events that Wayland-native apps silently ignore, yet returns exit 0. Only try xdotool on pure X11 sessions (DISPLAY set, WAYLAND_DISPLAY unset) so it doesn't block the ydotool fallback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Server scripts (transcribe-server, moonshine-server, parakeet-server) now source ~/.config/talktype/config directly. Previously, env vars like WHISPER_MODEL were shell-local in talktype and didn't propagate to server subprocesses, causing the daemon to load the wrong model. Also bumps startup timeout from 30s to 60s for whisper and moonshine servers (large models + cold CUDA init can exceed 30s on reboot). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
If the daemon crashes (e.g. CUDA not ready right after reboot), the socket file remains but nobody is listening. Previously socat would hang forever. Now the transcribe command checks the PID is alive before connecting, cleans up stale state if not, and restarts the daemon. Also adds socat -T 30 timeout as a safety net. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
~/.config/talktype/configdirectly soWHISPER_MODELand other settings work when invoked standalone or after rebootTest plan
transcribe-server startloads configured model (large-v3-turbo) instead of defaulting tobase🤖 Generated with Claude Code