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.
This commit is contained in:
parent
c3465a4a9d
commit
6723c9a59e
3 changed files with 14 additions and 4 deletions
|
|
@ -1,4 +1,6 @@
|
|||
#!/bin/sh
|
||||
# Start dictation only when the daemon is idle. Guards against stray toggle
|
||||
# events (key repeat, re-fired press binds) inverting the recording state.
|
||||
[ "$(whisrs status 2>/dev/null)" = "idle" ] && exec whisrs toggle
|
||||
# Logs each invocation to /tmp/whisrs-hold.log for debugging dropped events.
|
||||
echo "$(date +%H:%M:%S.%N) press status=$(whisrs status 2>/dev/null)" >> /tmp/whisrs-hold.log
|
||||
[ "$(whisrs status 2>/dev/null)" = "idle" ] && exec whisrs toggle
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
#!/bin/sh
|
||||
# Stop dictation only when actually recording. If the release bind never
|
||||
# fires, whisrs' own silence auto-stop (2s) ends the recording instead.
|
||||
[ "$(whisrs status 2>/dev/null)" = "recording" ] && exec whisrs toggle
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
[audio]
|
||||
device = "pipewire"
|
||||
|
||||
[input]
|
||||
# pi's Ink TUI drops injected keystrokes while it is busy streaming output;
|
||||
# raise the inter-key delay so dictation survives that.
|
||||
key_delay_ms = 10
|
||||
|
||||
[general]
|
||||
backend = "local-whisper"
|
||||
language = "en"
|
||||
|
|
@ -9,4 +14,5 @@ notify = true
|
|||
audio_feedback = true
|
||||
|
||||
[local-whisper]
|
||||
model_path = "/home/jeena/.local/share/whisrs/models/ggml-base.en.bin"
|
||||
model_path = "/home/jeena/.local/share/whisrs/models/ggml-base.en.bin"
|
||||
phrase_silence_ms = 250
|
||||
Loading…
Add table
Add a link
Reference in a new issue