mirror of
https://github.com/Louis-CFM/coucou.git
synced 2026-12-06 23:24:20 +09:00
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
9 lines
352 B
Bash
Executable File
9 lines
352 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
TEST_DIR="$(mktemp -d "${TMPDIR:-/tmp}/coucou-flow-keys.XXXXXX")"
|
|
trap 'rm -rf "$TEST_DIR"' EXIT
|
|
swiftc NotchBuddy/Sources/App/FlowKeyLogic.swift NotchBuddy/Sources/App/DictationTranscript.swift \
|
|
tests/FlowKeyLogicTests.swift -o "$TEST_DIR/flow-keys-tests"
|
|
"$TEST_DIR/flow-keys-tests"
|