<details>
<summary>Prompts Used</summary>
User: This checkout corresponds to https://github.com/jimrandomh/faceclaw/pull/27. Review this branch.
GPT-6 Astra:
> Found one issue:
>
> - **[P2] Wait for Whisper’s final result before completing dictation** — [FaceclawVoiceController.java:729](/Users/jbabcock/repositories/g2/faceclaw/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawVoiceController.java:729). Skipping partial decodes leaves short utterances without text until release, but the dialog still finalizes after its existing timeout. If decoding exceeds roughly 2.7 seconds (native stop’s 1.5-second wait plus the dialog’s 1.2-second timeout), auto-send can abandon a short command or send an incomplete longer one. Continue can append the late editing instruction literally instead of refining the message. I reproduced these outcomes with delayed transcript events. These flows should await recognition completion.
>
> Validation: TypeScript and a clean Android build passed. All 21 test failures also occur on `main`. Actual Whisper latency was not tested on hardware.
<hr>
User: Thanks, let's fix that issue.
GPT-6 Astra:
> Fixed. Dictation now waits for native recognition to finish before fallback timers run. Auto-send, Continue, and AI Chat preserve delayed Whisper results; cancellation ignores late transcripts.
>
> TypeScript and Android builds pass. All 11 new regression tests pass. The full suite still has the same 21 pre-existing failures.
</details>
Implements the Even R1 ring's health-sync protocol, reverse-engineered from
Bluetooth HCI snoop captures of Even's own app and confirmed field-by-field
against that app's CSV export. Answers the open question in issue #22, and in
notes/apps.txt, about where interpretation happens: it happens ON THE RING.
Sleep arrives already classified into stages; the phone does no inference.
RingProtocol.java: 15-byte header, 2-byte command id, CRC-32C (non-reflected)
over the frame body, fragment reassembly, and decoders for all five record
types -- heart rate, HRV, SpO2, sleep and steps. Hourly types share the shape
[hour_index][avg][max][min]. Steps are 10-minute buckets counted from the
record's anchor. RingProtocolSelfTest.java covers the codec against captured
bytes.
Three traps are documented in the code because each one costs days and a
reviewer "tidying" any of them would silently break the sync:
1. The 00:08 handshake frame is the ONE request whose payload carries no
nonce -- it is exactly 3f 01 01. Measured across 46 real writes with zero
exceptions: the 3-byte form is always answered, the 5-byte form never is.
Prepending a nonce makes the ring discard the frame and then ignore every
subsequent request on that connection.
2. The ring holds only one health type's response in flight. Requesting the
next type before the previous type's DATA arrives silently drops it, and a
lost race appears to discard that backlog PERMANENTLY rather than delaying
it. requestRingHealth() is therefore response-paced, not sleep-paced, and
ACKs each page as it lands.
3. HEALTH_COMMANDS mirrors the order Even's app uses. Whether the ring cares
is untested, and matching is the cheap way not to find out the hard way.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
sherpa-onnx's native library already reads an offline Whisper config
(verified against sherpa-onnx/jni/offline-recognizer.cc at v1.13.0);
only the Java wrapper was a package-private stub. This adds a public
OfflineWhisperModelConfig builder and wires base.en (int8) in as a
second on-device model next to Moonshine.
- FaceclawVoiceController: setOnboardModelKind() selects the model
before start("onboard"); defaults to Moonshine. Whisper skips the
700ms live-partial redecode (each call re-encodes the whole utterance
plus ~10s of tail padding) and gates near-silent segments before
decode.
- asr-model.ts: ASR_MODELS registry with per-model download state.
- Settings > Voice: "On-device (Moonshine)", "On-device (Whisper)",
and "OpenAI (Whisper)" for the existing cloud provider (stored
value unchanged); one model row per on-device model.
- Microphones live captions pass "moonshine" explicitly (unchanged).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>