Words on the glasses while recording, and "Heard:" for spoken questions (0.4.0)

While a recording is being made the app sends the recording so far to a
new bridge route, POST /v1/transcribe, about every half second of new
audio and one request at a time, and draws the words under "... is
listening…", newest words kept in view. No new service: it is the Whisper
already in the bridge. A preview is only ever drawn. The question is
transcribed again by its own turn, so a preview can never be what the
agent receives.

After sending, the last preview stays under "Transcribing…", then "Heard:"
shows the transcript the bridge gave the agent, now for every spoken
question (it was hands free only). The reducer tracks `spoken` explicitly
and treats an accepted, not yet transcribed recording as transcribing.

Bridge: /v1/transcribe needs a device credential, shares the audio checks
with /v1/wake, runs one at a time per device within
HERMEVEN_PREVIEWS_PER_MINUTE (60), creates nothing and logs no text.
An older bridge answers 404 and the client stops asking.

Simulator: a scenario that launches the app as shipped (menu, hands free)
as Round 18 required. A diagnostics note marks when listening for a name
starts and stops.

Also records the 0.3.0 deployment, upload and Dan's device report
(docs/evidence/device/2026-11-28.md), and decision 0005.

Not reviewed, not deployed, not uploaded, not device-tested.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Dan
2026-11-28 11:44:36 -08:00
co-authored by Claude Fable 5.2
parent 44ea1148c3
commit f9946a027a
19 changed files with 531 additions and 32 deletions
+1
View File
@@ -22,6 +22,7 @@ Every error has the shape:
| `POST /v1/conversations` | Start a new conversation. Optional `agent_id` (an id from `/v1/agents`; omitted = the default agent; anything else is 400 `invalid_request`). Closes the device's previous conversation **with that agent** only. | 201 |
| `POST /v1/turns` | Create one turn (text or audio). | 202, or 200 for a duplicate |
| `POST /v1/wake` | One stretch of speech heard while the app was open (raw audio body, same format as an audio turn; query: `schema_version`, `locale`, `encoding`, `sample_rate`, `channels`). Transcribed in memory and dropped. Answers `{matched, agent_id, text, near_miss}`: whether it **began** with an agent's name, which agent, and what was said after the name (empty for the name alone). When not matched `text` is always empty; `near_miss` is the first word if it was close to a name. Creates no turn and sends nothing to any agent. 404 `not_found` when speech-to-text is off or no agent has a usable name (also what an older bridge answers); 429 `rate_limited` over `HERMEVEN_WAKE_CHECKS_PER_MINUTE` (default 30) or while this device's previous check is still running. A failed transcription is answered as not matched. | 200 |
| `POST /v1/transcribe` | The words in a recording that is still being made, for showing while the user speaks. Same body and query as `/v1/wake`. Answers `{text}` (empty if nothing was recognised or transcription failed). Transcribed in memory and dropped; creates no turn, sends nothing to any agent, logs no text. 404 `not_found` when speech-to-text is off (also what an older bridge answers); 429 `rate_limited` over `HERMEVEN_PREVIEWS_PER_MINUTE` (default 60) or while this device's previous preview is still running. | 200 |
| `GET /v1/turns/{request_id}` | Current state and result. | 200 |
| `POST /v1/turns/{request_id}/cancel` | Request cancellation. Idempotent. | 200 |