Files
Tommi Kyntola 22ca5ed598 Dictation: space between consecutive utterances
A pause splits one spoken paragraph into several VAD utterances, each its own
transcript, own :type-text plan and own paste at the same cursor -- and
router/single-line trims, so they butted together: "right now.What happens".
Neither existing whitespace mechanism covered the boundary (the ear's " ".join
only joins whisper segments inside one utterance).

A dictated utterance that CONTINUES an open run is now typed with a leading
space. Leading, not trailing, so a submitted prompt carries no stray
whitespace and a fresh input box never starts with one; suppressed when the
text opens with punctuation that must hug the previous word.

State carries the run as :dictation-run {:at ms :slot n}, open while the last
thing DELIVERED was an unsubmitted dictation. The daemon decides continuation
(continuing?) and stamps the marker (run-after); the router stays pure and
just receives a :continuation opt. Storing the slot makes a target switch end
the run for free. The run also ends on submit/keys/macro, raw send, esc,
"voice off"/mute, and after :dictation-continue-gap-s seconds (60 default).

Two traps worth knowing, both recorded in ai/gotchas.md:

- The reset hangs off the deliberate stops (voice-off, mute, toggle-vad's
  close branch), NOT a generic "mic not open" test -- a latch stop closes the
  mic before its transcript exists, which would kill continuation in
  :manual-recording entirely.
- Nothing delivered must neither open nor close a run: a dry-run, a
  confidence-gated utterance and a failed paste all leave the input box as the
  last real delivery left it.

Also documents three things this session's live verification cost: a private
test daemon must isolate its DIRS and not just its socket, never pkill the
daemon by cmdline (it matches the user's systemd unit), and name-based tmux
pane targets are only stable on hand-renamed windows. AGENTS.md's recipe is
fixed accordingly.
2026-08-17 13:35:48 +03:00
..