Skip to main content
When streaming audio to Gladia API, you can stream it either as binary frames or as JSON messages containing a base64-encoded chunk.

Send audio chunks

There are two ways to stream audio:
  1. As binary WebSocket frames:
  1. As JSON, base64-encoding the audio chunk

Tips

  • Keep chunks reasonably sized (≃ 100ms) for low latency.
  • Make sure your chunks are contiguous audio frames with the same format as configured during session initiation.
  • On recoverable disconnects, reconnect using the same url to continue streaming.