Audio Streaming
Call media is raw PCM: mono, 16-bit little-endian. There is no container or
codec layer in the SDK. Configure rate and buffers with CallAudioConfig, and
match the sample rate to the attached speech model.
Configuration
Configure PCM with CallAudioConfig on SessionManagerConfig.create(...).
Per-party receive
The agent is the sender (send_audio), not a receivable track.
Send, backpressure, interrupt
send_audio does not write straight to the wire. Bytes land in an internal ring buffer; the SDK drains it as the server pulls. That is why barge-in needs an explicit clear: otherwise the caller still hears the old sentence for a beat.
After hangup, send_audio / clear_send_audio_buffer raise CallClosedError. Treat that as the normal stop signal.
Concurrent bridge (complete pattern)
Wire hangup to cancel model work:
