Commit Graph
2 Commits
Author SHA1 Message Date
Claude 362c7a797d Flow dictation: keep the last word and the whole sentence
From the first long dictations: the last word was lost when the key came
up while saying it, and a long stretch in the middle of a sentence was
missing.

- After the key comes up, the microphone stays open 0.6 s, then Coucou
  waits for the recognizer's final result (up to 1.5 s) even with one
  language: it carries the last words. The chat's mic gets the same wait.
- DictationTranscript merges each result with the words seen before: a
  result that looks like a fresh start (Apple's recognizer can start over
  after a pause) closes the text so far, and a word heard earlier that no
  newer word covers in time is put back where it was (a dropped middle
  stretch). Normal results keep the recognizer's own formatting.
- Tests for the merge (growth, correction, shifted times, dropped middle,
  fresh start, no times) in scripts/test-flow-keys.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-10-14 03:59:17 +02:00
Claude bab65ffe4c Flow dictation: hold a key, speak, the words are pasted where you type
Like Wispr Flow, built into Coucou (macOS, GitHub build). Hold the key
(right Option by default; right Command, right Control or fn), speak, let
go: MacDictation turns the voice into text and Coucou pastes it at the
cursor (clipboard + Cmd-V, then the clipboard gets back what it held).
Two quick taps: hands-free until the next tap. Esc, or another key while
the key is held (a shortcut such as Option-E), cancels.

A pill at the bottom of the screen (non-activating, click-through, every
Space): a black capsule, a tiny Mochi and nine dots driven by an FFT of
the microphone, graves on the left, aigus on the right; they ripple while
the Mac finishes the words. Without the Accessibility permission the
words wait on the clipboard and the pill says so.

Settings -> Voice -> Flow dictation, off by default, strings in the ten
languages. FlowKeyLogic (hold, tap, double tap, cancel) and the band
maths are pure and tested (scripts/test-flow-keys.sh, in CI).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-10-14 02:57:11 +02:00