AudioFormat
AudioTrack
The local audio track returned byChannel.publish_audio.
write
audio_format specified when publishing) of any length. The SDK splits it into 20 ms frames and sends them at real-time pace.
bytes: S16LE interleaved PCM; the byte count must be a multiple of2 × number of channels, otherwiseValueErroris raisednp.ndarray: converted toint16; for stereo, flatten it in interleaved order
max_buffer_seconds, write waits until there’s room in the buffer before returning (backpressure).
When idle, the SDK keeps sending silence frames, keeping RTP timestamps in sync with real time. So however long the pause between two sentences, the next sentence isn’t dropped by the remote side as late data.
clear
wait_for_playout
buffered_seconds
AudioFrame
A decoded frame of remote audio.
On the same track, two adjacent frames satisfy
next.pts == prev.pts + prev.samples, so the timeline is continuous.
VideoFrame
A frame of remote video.A decoded image is provided for every frame. Vision models usually don’t need such a high frame rate, so sample frames as needed (for example, one frame per second).