Skip to content

Remove the server-supplied digit audio pack from dynamic pairing - #241

Merged
maximmaxim345 merged 3 commits into
mainfrom
chrisuthe/task/remove-the-server-supplied-digit-audio-pack-from
Sep 10, 2026
Merged

maximmaxim345 merged 3 commits into
mainfrom
chrisuthe/task/remove-the-server-supplied-digit-audio-pack-from

Conversation

@chrisuthe

Copy link
Copy Markdown
Member

Removes the digit audio pack that #173 introduced. During initial pairing the pack came from an unauthenticated peer, which thereby chose what the client's speaker played and drove the client's audio decoders before any trust was established. Speaking clients return to their own bundled voice, choosing the language against the server's languages hint in server/hello under RFC 4647 Lookup matching, as before #173.

Hand revert rather than git revert: #179, #194 and #237 have since rewritten the surrounding text, and the languages move from server/activate to server/hello in #173 stays, since client/pair-pending's message field relies on it.

Changes, all in messaging.md and pairing.md with README.md regenerated:

  • Binary message ID 2 returns to the reserved 2-3 range.
  • server/activate pairing.format? no longer conditions digits on fitting a pack.
  • Sequence diagram, Digits emission, Protocol Errors, the dynamic_pairing_code descriptor (digit_audio removed; out_channels unchanged), the Messages intro, client/pair-init and server/pair-init lose their pack references.
  • The Server → Client: Digit Audio Clip (Binary) section is removed.

Closes #203

A speaker client's digits again come from its own bundled voice, with the
language chosen against the server's languages hint (RFC 4647 Lookup),
rather than from clips supplied over the wire by an unauthenticated peer.
Binary message ID 2 returns to the reserved range.
Makes explicit what the Digits emission paragraph only implied: a client
that speaks the pairing code does so from audio it bundles itself, and the
server sends none.
@chrisuthe
chrisuthe marked this pull request as ready for review September 9, 2026 20:46

@maximmaxim345 maximmaxim345 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @chrisuthe !

@maximmaxim345
maximmaxim345 merged commit ca0e5d1 into main Sep 10, 2026
1 check passed
@maximmaxim345
maximmaxim345 deleted the chrisuthe/task/remove-the-server-supplied-digit-audio-pack-from branch September 10, 2026 06:52
maximmaxim345 added a commit to Sendspin/sendspin-js that referenced this pull request Oct 28, 2026
# What does this implement/fix?

<!-- Quick description and explanation of changes. -->

Audio from a server that sends the spec's 13-byte audio chunk header was
corrupted, since the client read the 4-byte `send_ahead` field as audio.
The client also sent `trust_level` and player `supported_commands` in
`client/hello`, which strict servers reject.

The client now sends the rc1 `client/hello` and skips the full 13-byte
header, and `send_ahead` doesn't affect playback. The operator's
`languages` for a spoken pairing code are now read from `server/hello`,
where the spec defines them.

Breaking changes:
- A server that still sends 9-byte audio chunk headers now plays
corrupted audio.
- `ClientHello` no longer has `trust_level` or player
`supported_commands`, and `ActivatePairing` no longer has `languages`.

Closing the connection on an audio message shorter than 13 bytes is left
for a later PR.

**Related issue or spec PR (if applicable):**

- Sendspin/spec#158
- Sendspin/spec#167
- Sendspin/spec#177
- Sendspin/spec#241

## Types of changes

<!--
Tick exactly one box. CI (.github/workflows/pr-labels.yaml) applies the
matching label, and the release notes use it to sort this change.
-->

- [ ] Bugfix (non-breaking change which fixes an issue): `bugfix`
- [ ] New feature (non-breaking change which adds functionality):
`new-feature`
- [ ] Enhancement to an existing feature: `enhancement`
- [x] Breaking change (changes the public API or the protocol in a way
that is not backwards compatible): `breaking-change`
- [ ] Refactor (no behavior change): `refactor`
- [ ] Documentation only: `documentation`
- [ ] Maintenance / chore: `maintenance`
- [ ] CI / workflow change: `ci`
- [ ] Dependencies bump: `dependencies`
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.

Revert https://github.com/Sendspin/spec/pull/173

2 participants