Opening menu and hands-free mode: call an agent by name (0.3.0)
The app now opens on a menu, which is the root page: "Hands free" first, "Agents" second. Agents is the 0.2.0 app unchanged. Hands free is the same agents, conversations and question path with one flag set: the microphone listens while the app is at rest and the app does not leave by itself. The mode is never remembered; every launch starts at the menu with the microphone closed, and double tap at Ready returns to the menu and closes it. Client: a loudness-only speech segmenter (core/vad.ts) cuts the stream into utterances; each goes to the bridge for a wake check. "Wendy, <q>" becomes a text turn to Wendy, with what was heard shown while she works. A name alone starts a recording that sends itself when the speaker stops. The status line starts with a dot for exactly as long as the microphone is open at rest. In wake mode every microphone open and close goes through one serialised reconciler; without the option the old path is untouched. Bridge: POST /v1/wake transcribes one utterance in memory and reports whether it BEGAN with an agent's name (first word of the display name, or an alias from HERMEVEN_AGENT_<ID>_WAKE). Exact match only; a near miss is reported as one word and never acted on. Creates no turn, stores nothing, returns and logs nothing that was not addressed to an agent. One check at a time per device, HERMEVEN_WAKE_CHECKS_PER_MINUTE (30). Docs: decision 0004, bridge API, security gaps 3c/3d, device plan D. The manifest's microphone description changed. Not reviewed, not deployed, not uploaded, not device-tested. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
# 0004: An opening menu, and a hands-free mode that listens for an agent's name
|
||||
|
||||
Status: implemented with fakes only; **nothing here is device-tested**. Date: 2026-11-28.
|
||||
|
||||
Dan (2026-11-28) first asked for the app to be always listening ("I want to be able to say
|
||||
'Wendy' to send whatever follows to Wendy, Cody to Cody"), then, after reading what that costs,
|
||||
chose: leave the app as it is, add this as a "hands free" mode, and open on a menu with
|
||||
"Hands free" first and "Agents" second, so that after "Hey Even, launch Pepper" one tap starts it.
|
||||
|
||||
## The menu
|
||||
|
||||
The app opens on a menu, which is now the root page:
|
||||
|
||||
```
|
||||
Hermeven
|
||||
|
||||
> Hands free
|
||||
Agents
|
||||
```
|
||||
|
||||
Swipe moves, tap opens, double tap asks the system to exit. Double tap at Ready goes back to the
|
||||
menu (it used to exit). An untouched menu leaves the glasses after 30 s, like Ready does. A
|
||||
question that was still running when the app was last closed is shown instead of the menu.
|
||||
|
||||
**Agents** is the app exactly as it was in 0.2.0: tap or hold to ask, swipe to choose, leaves
|
||||
when idle, the microphone opens only on a tap.
|
||||
|
||||
**Hands free** is the same screens, agents, conversations and question path, with one flag set.
|
||||
The flag does two things: the microphone listens while the app is at rest, and the app does not
|
||||
leave by itself. There is no second implementation of agents. The mode is not remembered: every
|
||||
launch starts at the menu with the microphone closed, and going back to the menu closes it.
|
||||
|
||||
Later entries (Telegram, spoken answers through a headset or Android Auto) are not designed
|
||||
here. The menu takes more entries; a mode that needs its own screens will need more than a flag.
|
||||
|
||||
## Hands free
|
||||
|
||||
While in this mode and at rest (Ready, an answer, an error, "Cancelled") the glasses' microphone
|
||||
is open. The status line starts with `●` for exactly as long as it is.
|
||||
|
||||
- "Wendy, what is on my calendar" in one breath: the question goes to Wendy.
|
||||
- "Wendy" alone: a recording starts for Wendy and is sent when the speaker stops (1.2 s pause).
|
||||
If nothing is said for 6 s it is dropped.
|
||||
- The name must be the **first** thing said ("hey"/"ok" before it is allowed). A name in the
|
||||
middle of a sentence does nothing.
|
||||
- Tap, hold-to-talk and swipe-to-choose all still work.
|
||||
- While a question is being transcribed or answered the microphone is closed.
|
||||
- The app does not leave the glasses by itself while in this mode.
|
||||
|
||||
## How
|
||||
|
||||
| Step | Where | Why there |
|
||||
|---|---|---|
|
||||
| Find stretches of speech | Phone, `core/vad.ts`, loudness only | So silence is never uploaded, and one utterance is one request. |
|
||||
| Transcribe and test for a leading name | Bridge, `POST /v1/wake`, the Whisper already there | The SDK gives raw PCM only; a keyword model in the WebView would need training per name. |
|
||||
| Ask the agent | The existing turn path (a text turn, or an audio turn after a name alone) | Request ids, deduplication, cancel and recovery are unchanged. A wake check creates nothing. |
|
||||
|
||||
Matching is exact, against the first word of the agent's display name or an alias from
|
||||
`HERMEVEN_AGENT_<ID>_WAKE`. A word that is only close ("Wendi", "copy") is reported to the phone's
|
||||
Diagnostics as a near miss and is never acted on.
|
||||
|
||||
## What this reverses
|
||||
|
||||
- "The microphone opens only on a tap" and "is never reopened without a new tap"
|
||||
(`docs/feasibility.md` section 2) hold in Agents and not in Hands free.
|
||||
- Idle exit (0.1.1) is suspended in Hands free.
|
||||
- Double tap at Ready no longer opens the system exit dialog; the menu is the root page now.
|
||||
Whether Even's review accepts a root page reached by two double taps is unverified.
|
||||
- "There is no end-of-speech detection" (0003): there is now, for recordings started by name.
|
||||
- The phone's Diagnostics may now show one spoken word (a near miss). Nothing else spoken
|
||||
appears in any log.
|
||||
|
||||
## Owner decisions pending (decide on the device)
|
||||
|
||||
1. In Hands free, staying open means phone notifications may not reach the lenses (one observation, 2026-11-21).
|
||||
2. In Hands free, an agent that can act (Pepper sent a Telegram message) can be started by speech nobody
|
||||
pressed a button for. Mitigations are the first-word rule, exact matching, the "Heard: ..."
|
||||
line while the agent works, and double tap to cancel. There is no confirmation step.
|
||||
3. In Hands free, every stretch of speech near the glasses, addressed to an agent or not, is uploaded to the
|
||||
bridge and transcribed there before being dropped.
|
||||
4. The names are needed on every question, including follow-ups.
|
||||
5. The menu costs one extra tap before the first question in Agents.
|
||||
|
||||
## Unknown until tried on a G2
|
||||
|
||||
Microphone level and background noise against the detector's thresholds (first guesses); whether
|
||||
Whisper spells the names as configured; delay from the end of speech to "thinking" (one upload
|
||||
and one transcription, about 1 to 2 s on the server's figures); battery with the microphone open
|
||||
continuously; whether the stream survives a locked phone for long periods; the server's CPU with
|
||||
a conversation or a television nearby (each stretch of speech is a transcription; capped at 30
|
||||
checks a minute, one at a time).
|
||||
Reference in New Issue
Block a user