upload_type: stream return a wss:// URL as upload_url. Connect and stream — the server auto-detects the wire format from your first frame.
Option A — raw binary: send 16-bit LE, mono, 16 kHz PCM as binary frames.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Real-time audio streaming for upload_type: stream
upload_type: stream return a wss:// URL as upload_url. Connect and stream — the server auto-detects the wire format from your first frame.
Option A — raw binary: send 16-bit LE, mono, 16 kHz PCM as binary frames.
const ws = new WebSocket(uploadUrl);
ws.binaryType = "arraybuffer";
ws.onopen = () => ws.send(pcmChunk);
{ "event": "start", "start": { "mediaFormat": { "encoding": "audio/x-l16", "sampleRate": 16000 } } }
{ "event": "media", "media": { "payload": "<base64 PCM>" } }
{ "event": "stop" }
Was this page helpful?
