- Ambient /ws/stream
- Dictation /ws/transcribe
Message format
Each outbound message is a JSON object with atype field. For messages that carry a payload, use the data field.The data value must be:- Standard Base64 (RFC 4648)
- An encoding of the raw bytes you intend to send
- Sent as a JSON string, regardless of the programming language you use
Start the stream segment
Send oneSTART_TIME message before the audio chunks for a stream segment:data: Base64 of UTF-8 bytes of an RFC 3339 timestamp- Example timestamp:
2026-04-25T12:34:56Z
Send audio chunks
Send audio withtype set to AUDIO:data: Base64 of raw PCM audio bytes
Send control events
Send control events withtype set to EVENT:event field, not data. Supported values are PAUSE, RESUME, KEEP_ALIVE, CANCEL, and ABORT.The ambient stream handler acts on
PAUSE, RESUME, and CANCEL. While the stream is paused, send KEEP_ALIVE at least once every five seconds per the idle-timeout guidance (maximum pause 30 minutes).- Pause or resume audio.
- Keep the connection alive.
- Cancel or abort a stream.
EVENT messages can appear at any point in the stream where control is needed.End the stream segment
Send the finalAUDIO message with data set to RU9G:RU9G is Base64 for ASCII EOF (0x45 0x4F 0x46).Required message order
For each stream segment:- Send one
START_TIMEmessage. - Send one or more
AUDIOmessages with Base64 PCM audio. - Send any
EVENTmessages when control is needed. - Send a final
AUDIOmessage withdataset toRU9G.
Example flow
This example shows the outbound message sequence for one ambient stream segment: oneSTART_TIME message, multiple AUDIO chunks, an optional EVENT, and the final RU9G end marker.Audio format and chunking
Use raw PCM audio chunks in eachdata message after Base64 decode. For more information, refer to: Read Audio capture best practices for capture settings and PCM guidance.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.
PCM vs WAV
Raw PCM is audio data without a file container..wav is a container format and includes headers.If your source is WAV, remove the 44-byte RIFF header, or decode the file to raw PCM before sending. Sending WAV headers as PCM reduces recognition quality and makes debugging harder.Recommended audio format
- Encoding: LINEAR16, PCM signed 16-bit little-endian
- Channels: Mono
- Sample rate: 16 kHz
Chunk size
Suki supports 100 ms audio chunks to balance recognition quality, latency, and efficiency. At 16 kHz, mono, 16-bit audio, each chunk contains about 3200 bytes of raw PCM before Base64 encoding.- Send each chunk as one
AUDIOJSON text frame. - Keep chunks at 100 ms throughout active streaming.
- Pace chunks at or near real time instead of sending buffered audio as quickly as possible.
- Send audio at least once every 25 seconds while the stream is active, or Suki disconnects the stream. When the stream is paused, follow the
KEEP_ALIVEguidance.
Encode each chunk
For everyAUDIO message:- Take raw PCM bytes.
- Encode the bytes using standard Base64 (RFC 4648).
- Send the encoded string as
data.
Related topics
Stream Ambient Audio
How ambient streaming works, JSON text rules, and links into this wire format.
Stream Dictation Audio
How Dictation streaming works, prerequisites, and links into this wire format.
Audio Capture Best Practices
Capture format, environment, gain, and network readiness before you stream.
Dictation Transcript Frames
Inbound partial and final transcript frames for
/ws/transcribe.Complete the Session
Close the socket, end with REST, and troubleshoot common errors.