hypr-dotfiles/hypr/scripts/whisrs-hold-stop.sh
Jeena 6723c9a59e whisrs: stream phrases sooner and type slower for TUIs
Streaming dictation only emits a phrase after phrase_silence_ms of
silence; the 400ms default stalled long continuous speech until the
20s force-split, which read as "the text cuts off". 250ms emits at
short breathing pauses instead.

key_delay_ms was the 2ms default, which drops characters in busy
Node/Ink TUIs like the pi chat while they are streaming output;
10ms keeps dictation readable there.
2026-09-18 06:50:09 +09:00

6 lines
394 B
Bash
Executable file

#!/bin/sh
# Stop dictation only when actually recording. If the release bind never
# fires, whisrs' own silence auto-stop ends the recording instead.
# Logs each invocation to /tmp/whisrs-hold.log for debugging dropped events.
echo "$(date +%H:%M:%S.%N) release status=$(whisrs status 2>/dev/null)" >> /tmp/whisrs-hold.log
[ "$(whisrs status 2>/dev/null)" = "recording" ] && exec whisrs toggle