Skip to content

Voice over the Relay through the link - #174

Merged
longzhi merged 3 commits into
mainfrom
claude/voice-over-relay
Oct 25, 2026
Merged

longzhi merged 3 commits into
mainfrom
claude/voice-over-relay

Conversation

@longzhi

@longzhi longzhi commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Closes #163. It amends ADR-0018. Stacked on #169; it retargets to main as the PRs below it merge. It replaces #172 and vibebuddy-cloud#15, which are closed.

Why

ADR-0018 had the box call the voice service itself over the Relay, with an hour-long voice token. dragon and Claude dropped that on 2026-10-24, because it cost much more than it saved:

  • it needed an HTTP client and a second TLS session in the firmware, on tight RAM;
  • it needed a token endpoint and a token handout that exist only for this path;
  • the firmware would have to follow every change to the voice API.

All that to save one hop: a few hundred ms against an answer that takes about 10 s. Its other reason, keeping audio off the Relay, went with ADR-0015, because the link there is end-to-end encrypted. The ADR's Considered options record this.

What changes

  • Firmware (device/src/main.rs): write_stream (VOICE DATA, about 21 lines a second) now also seals lines onto the Relay.
    • It leaves 8 of the 32 places in the outgoing queue to the box's other lines, so VOICE END isn't lost behind audio.
    • Lines are dropped before they're sealed, as SealedLines::lines already guarantees, so the Noise session stays in step.
  • Daemon: voice is offered and taken over the Relay as anywhere but the UART bridge. The test asserts the offer over the Relay.
  • Docs: ADR-0018 is amended (title, decision, considered options, consequences). docs/protocol.md now has VOICE DATA going over the Relay, and docs/api.md says only daemons call the voice API.

Checked

  • cargo test --workspace --locked: all pass (daemon 337, firmware core 86). cargo clippy has no new warnings.
  • The firmware builds for the box: cargo build --release in firmware-rs/device.
  • Not on a box. dragon's box is unplugged for the weekend. The issue's criteria need one linked only through the Relay: a turn heard, answered and spoken; a 20 s recording; no rate close.

🤖 Generated with Claude Code

longzhi and others added 2 commits October 23, 2026 23:26
The box was to call the voice service itself over the Relay, with a
voice token. That needs an HTTP client and a second TLS session in the
firmware, a token endpoint and a token handout, and a box that follows
every change to the voice API, to save one hop of a few hundred
milliseconds; the Relay carries only ciphertext since ADR-0015.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The box sends its recording over the Relay too, as it does over USB and
the local network, leaving 8 places in the Relay's outgoing queue to its
other lines so VOICE END isn't lost behind audio; the daemon offers voice
and takes the turn there as anywhere but the UART bridge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 15:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@longzhi
longzhi changed the base branch from claude/voice-v1-daemon to main October 24, 2026 00:07
@longzhi
longzhi merged commit f5cb347 into main Oct 25, 2026
@longzhi
longzhi deleted the claude/voice-over-relay branch October 25, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accounts: voice over the Relay through the link

2 participants