Repository navigation
Deliver spoken pairing-code digits as server-supplied audio pack - #173
Conversation
e09ad87 to
00c498f
Compare
| - `codec`: 'opus' | 'flac' | 'pcm' - codec identifier | ||
| - `sample_rate`: integer - sample rate in Hz (e.g., 16000) | ||
| - `bit_depth`: integer - bit depth (e.g., 16); meaningful for `pcm` and `flac` only, ignored for `opus` | ||
| - `max_bytes`: integer - maximum total encoded size of the ten clips in bytes |
There was a problem hiding this comment.
Idea: Should we give a minimum size to not land in the situation that some clients can't be paired with some servers/languages?
There was a problem hiding this comment.
Maybe that wouldn't be a bad idea.
@kahrendt What do you think we could put here? Would something like 32 KiB be reasonable?
It would be easier to make this decision if we first had recordings for a bunch of languages that we want to support.
There was a problem hiding this comment.
32 KiB is very restrictive for PCM. That's only 1 second at 16 kHz mono audio at 16 bits per sample. I would imagine most clients would just use their output format sample rate; i.e., 48 kHz, and that is only 0.33 seconds.
There was a problem hiding this comment.
Sure, but should be enough for Opus probably?
Otherwise we would have to mandate it based on the supported codecs, so that gets a little more complicated.
I'm leaning towards just leaving it out for now. We can reevaluate once we have the recordings.
There was a problem hiding this comment.
What is the benefit of supporting multiple formats for audio packs?
The server in either way will have to support any samplerate/bitdepth/codec (so you can actually pair it successfully).
That will also simplify the max_bytes recommendations in case we define different ones per codec.
There was a problem hiding this comment.
I removed the digit audio format negotiation.
maximmaxim345
left a comment
There was a problem hiding this comment.
I think this looks good now.
@arturpragacz can you create a issue (and add it to the project board) so we don't forget to add max_bytes recommendations/requirements?
|
I added it here: Sendspin/backlog#41. |
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 --------- Co-authored-by: Maxim Raznatovski <nda.mr43@gmail.com>
Deliver spoken pairing-code digits as server-supplied audio pack.
Speaker clients no longer need bundled voice assets. In the dynamic audio pairing flow the server supplies a pack of ten short clips, one per digit, in a language of its choosing, and the client plays them in pairing code order.
digit_audioin itsdynamic_pairing_codedescriptor: acceptedformats(codec, sample rate, bit depth) andmax_bytes.digit_audioin the pairingserver/activate.2: one clip per message, ten in ascending order. Clips are mono, at most 2 seconds each.languagesmoves from the pairing activation toserver/helloas a general operator-language hint.Needs #172 merged first.