Package
@attenlabs/saa-js
Version
0.1.0
What happened?
Bug report: saa-js README documents turnReady event payload inconsistently with TypeScript types
Summary
The saa-js README events table documents turnReady payload as:
{ audioBase64, audioPcm16, durationSec, frames, context }
But the Python SDK (saa-py) documents the equivalent TurnReadyEvent as having audio_pcm16: np.ndarray and audio_base64: str as the first two fields — i.e. the audio is a NumPy array in Python and an unspecified type in the JS table.
For a user integrating the JS SDK, it is unclear:
- What type is
audioPcm16? The README does not say. The Python README says np.int16, but JS has no equivalent.
- Is
audioPcm16 an Int16Array, a Float32Array, a plain ArrayBuffer, or something else?
- The
frames field is not described at all in the JS events table (the Python README says list[TurnFrame] with "JPEG stills, empty unless the server has frames_per_turn > 0").
Expected behaviour
The turnReady entry in the saa-js README should describe:
audioPcm16: Int16Array — PCM16 @ 16 kHz mono
frames: Blob[] — JPEG stills, empty unless frames_per_turn > 0 is configured server-side
context: string | null — e.g. "interjection_follow_up"; null for normal turns
Actual behaviour
The payload shape is listed without types. frames and context have no explanation at all.
Impact
Developers building audio pipelines against audioPcm16 (e.g. feeding a Web Audio AudioBuffer) cannot determine the correct type without reading TypeScript source.
Suggested fix
Expand the events table to include types for every field in the turnReady payload, matching the detail level of the Python README.
Labels
documentation, saa-js
Steps to reproduce
Steps to reproduce
- Open
packages/saa-js/README.md.
- Find the
turnReady row in the Events table.
- Try to forward
audioPcm16 to a Web Audio API AudioBuffer — the type is unknown.
Environment
No response
Logs / errors
Package
@attenlabs/saa-js
Version
0.1.0
What happened?
Bug report:
saa-jsREADME documentsturnReadyevent payload inconsistently with TypeScript typesSummary
The
saa-jsREADME events table documentsturnReadypayload as:But the Python SDK (
saa-py) documents the equivalentTurnReadyEventas havingaudio_pcm16: np.ndarrayandaudio_base64: stras the first two fields — i.e. the audio is a NumPy array in Python and an unspecified type in the JS table.For a user integrating the JS SDK, it is unclear:
audioPcm16? The README does not say. The Python README saysnp.int16, but JS has no equivalent.audioPcm16anInt16Array, aFloat32Array, a plainArrayBuffer, or something else?framesfield is not described at all in the JS events table (the Python README sayslist[TurnFrame]with "JPEG stills, empty unless the server hasframes_per_turn > 0").Expected behaviour
The
turnReadyentry in thesaa-jsREADME should describe:audioPcm16:Int16Array— PCM16 @ 16 kHz monoframes:Blob[]— JPEG stills, empty unlessframes_per_turn > 0is configured server-sidecontext:string | null— e.g."interjection_follow_up"; null for normal turnsActual behaviour
The payload shape is listed without types.
framesandcontexthave no explanation at all.Impact
Developers building audio pipelines against
audioPcm16(e.g. feeding a Web AudioAudioBuffer) cannot determine the correct type without reading TypeScript source.Suggested fix
Expand the events table to include types for every field in the
turnReadypayload, matching the detail level of the Python README.Labels
documentation,saa-jsSteps to reproduce
Steps to reproduce
packages/saa-js/README.md.turnReadyrow in the Events table.audioPcm16to a Web Audio APIAudioBuffer— the type is unknown.Environment
No response
Logs / errors