Skip to content

Add server-initiated-pcm-24bit scenario (#60)#68

Closed
balloob wants to merge 3 commits into
claude/conformance-request-formatfrom
claude/conformance-24bit-pcm
Closed

Add server-initiated-pcm-24bit scenario (#60)#68
balloob wants to merge 3 commits into
claude/conformance-request-formatfrom
claude/conformance-24bit-pcm

Conversation

@balloob
Copy link
Copy Markdown
Collaborator

@balloob balloob commented May 27, 2026

Summary

Notes

Test plan

  • python -m compileall src scripts
  • python -m conformance.cli run --results-dir results --from aiosendspin --to aiosendspin --timeout-seconds 25 shows the new scenario row with the expected fail-fast reason

balloob added 2 commits May 27, 2026 14:18
Adds the 24-bit PCM scenario from #60. The server
re-packs the fixture as 24-bit (3-byte packed, little-endian, two's
complement) and the matrix compares canonical hashes after the client
unpacks. Per the audit, sendspin-go has no 24-bit code path and Web
Audio in sendspin-js is float32-only — the conformance signal is
expected to be different per-SDK once `pcm-24bit-decode` is wired up
in each adapter.

`pcm-24bit-decode` is declared on the aiosendspin server only; every
client case fails fast until the adapter declares the capability.
The server adapter feeds 32-bit source PCM into the SDK with
AudioFormat(bit_depth=32). The aiosendspin PCM pipeline negotiates
the 24-bit packed wire format from the client, resamples s32→s32
through PyAV, and then converts the output to s24 on the wire. The
SDK's source-format path expects PyAV-compatible bytes (which means
s32, since PyAV does not have a packed-s24 sample format) — feeding
s24 directly would fail with \"got N bytes; need 4N/3 bytes\" inside
PyAV. The 16→32-bit shift preserves the float-domain hash, so the
existing audio-pcm verification continues to work end-to-end.

The client adapter advertises bit_depth=24 at the fixture's native
sample_rate/channels (8000 Hz mono) so the SDK does not resample
during the round trip; only the bit depth changes. aiosendspin's
client RoleSpec declares the new pcm-24bit-decode capability, and
the scenario flips its verification_mode to audio-pcm so the float
hashes are actually compared.
@balloob
Copy link
Copy Markdown
Collaborator Author

balloob commented May 27, 2026

Closing in favor of #NEW — that PR is rebased onto main without the capability mechanism (which only existed to drive the now-closed scaffolding PRs).

@balloob balloob closed this May 27, 2026
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.

1 participant