Commit Graph
6 Commits
Author SHA1 Message Date
Brezinben 882a239ee1 Flow: one press of the key starts hands-free
Closes #1059. A double tap is hard to hit on a two-key custom shortcut.
2026-11-04 18:56:07 +01:00
Claude bce6f87c5e Flow (Mac): mute the Mac while dictating, Copy card when nowhere to paste, custom shortcut
- Mute while dictating: once the blip is heard, every output in use goes quiet
  (videos, music, calls) and comes back as it was when the microphone closes.
  A Mac already muted stays muted; a crash mid-dictation is undone at launch.
  Settings → Coucou Flow → "Mute the Mac while you dictate", on by default.
- Nowhere to paste: the pill grows with the words (three lines at most, then
  "…") and a Copy button. In a web browser, the page itself no longer counts
  as a text field (YouTube, an article), so the card shows there too.
- Custom shortcut: "Hold to dictate" → "Custom shortcut…" unfolds an editor
  under the row. Hold 1 to 6 keys together, let go, ↩ saves (Esc cancels); the
  menu then shows the keys in place of "Custom shortcut". An event tap keeps
  the shortcut's own key (the D of ⌘⇧D) out of the app in front. Plain letters
  need ⌃, ⌥, ⌘ or fn; a left modifier alone, Esc, ↩ and Caps Lock are refused.
  FlowChord and FlowShortcutRules are tested in tests/FlowKeyLogicTests.swift.

Strings in the 16 languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B9uCpASh6JFgbMYMyYUrBN
2026-11-03 00:50:39 +00:00
Claude de25b4a7f8 Flow pill: opens under the pointer into its buttons, messages above it; no glow following the pointer on the bands
Under the pointer, the resting pill opens into Mochi and three buttons, each
with its bubble: dictate hands-free (then ✕ to cancel and ✓ to paste), record
a call, open Coucou. Messages grow above the pill with a button to act: the
words could not be pasted (no Accessibility: Allow; no text field where the
focus is: the words stay copied for ⌘V), the microphone is not available
(Settings), a call's notes are ready (See), the models are missing. The pill
takes clicks only where it and its bubble are.

The bands keep their particles reacting to the pointer, without the glow and
the lit border that followed it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-10-14 21:37:04 +02:00
Claude 6c3b8a8541 Flow dictation: a sentence said once is pasted once
"Salut coucou comment tu vas" came out twice. Apple's partial results
often carry no times (all zero) and the final one does; #636 then took the
earlier words for a stretch the final result had dropped and put them back.

Words are put back only if they had a time of their own, and never when
the new text already says them (times can also shift between results).
Two tests for these cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-10-14 13:35:56 +02:00
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