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:
@@ -8,6 +8,7 @@ import {
|
||||
ErrorResponse,
|
||||
RevokeResponse,
|
||||
SCHEMA_VERSION,
|
||||
TranscribeResponse,
|
||||
TurnResult,
|
||||
WakeResponse,
|
||||
type ErrorBody,
|
||||
@@ -191,6 +192,21 @@ export class BridgeClient {
|
||||
return this.call(WakeResponse, 'POST', `/v1/wake?${query}`, { binary: args.pcm });
|
||||
}
|
||||
|
||||
/**
|
||||
* The words in a recording still being made, for showing while the user speaks. Creates
|
||||
* nothing on the bridge. A bridge without it answers `not_found`.
|
||||
*/
|
||||
transcribe(args: { locale: string; pcm: Uint8Array }): Promise<TranscribeResponse> {
|
||||
const query = new URLSearchParams({
|
||||
schema_version: String(SCHEMA_VERSION),
|
||||
locale: args.locale,
|
||||
encoding: AUDIO_FORMAT.encoding,
|
||||
sample_rate: String(AUDIO_FORMAT.sampleRate),
|
||||
channels: String(AUDIO_FORMAT.channels),
|
||||
});
|
||||
return this.call(TranscribeResponse, 'POST', `/v1/transcribe?${query}`, { binary: args.pcm });
|
||||
}
|
||||
|
||||
getTurn(requestId: string): Promise<TurnResult> {
|
||||
return this.call(TurnResult, 'GET', `/v1/turns/${requestId}`) as Promise<TurnResult>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user