- End the session after streaming
- Poll session status and retrieve transcripts, notes, and structured data
How Ambient streaming works
Suki for Partners ambient streaming works as follows:- Create an Ambient session and Seed session context.
- Open a WebSocket connection to
GET /ws/stream. - Send one
START_TIMEmessage for the stream segment. - Send one JSON message per audio chunk.
- Optionally send
EVENTmessages, such asPAUSE,RESUME, orKEEP_ALIVE, when control is needed. - Send the ambient end marker as the final
AUDIOmessage. - Close the socket, then use End ambient session to end the session and retrieve results.
Send JSON text frames
Every message you send on/ws/stream must be a UTF-8 JSON text frame.
- Each WebSocket frame must contain exactly one JSON object.
- Each client
sendshould contain one logical message. - Audio bytes go inside a JSON string field, not in a binary WebSocket frame.
Audio streaming recommendations
Sample Rate of 16 kHz
Suki streams audio at 16 kHz, which captures the full range of clinical speech.
Mono Channel
Send a single mono channel of audio, not stereo or multi-channel.
LINEAR16 Encoding
Encode as LINEAR16 (PCM signed 16-bit little-endian). Remove WAV headers or decode to raw PCM before you send.
Audio Chunk Size of 100 ms
Suki supports 100 ms chunks to balance recognition quality, latency, and efficiency. At 16 kHz mono 16-bit, that is about 3200 bytes of raw PCM per chunk.
Stream at Real-Time Speed
Pace audio chunks to match their actual duration and stream at or near real time, rather than sending buffered audio as fast as possible.
References
Wire Format
Ambient message types (
START_TIME, AUDIO, EVENT, RU9G), required order, example flow, and audio format and chunking.Audio Capture Best Practices
Capture format, environment, gain, and network readiness before you stream.
Complete the Session
Close the socket, end the session with REST, fetch results, and use the streaming error reference.
Ambient Client Code Example
End-to-end Python, TypeScript, and Go example: login, create session, seed context, stream, and handle errors.
Audio Streaming API
Endpoint reference, handshake details, and API code samples for
GET /ws/stream.