For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /automcp/v1/voice.md.

Voice WebSocket

Availability: The AutoMCP production service is not yet deployed. This page and its examples describe the committed v1 contract for integration planning; requests to the API URL will not succeed until the runtime is released.

Voice uses wss://automcp.api.delino.io/voice/v1/apps/{app_id}/sessions/{session_id} with subprotocol automcp.voice.v1. After the exact Origin check, the first client JSON message authenticates an origin-bound, one-use Connect voice ticket.

Version 1 client messages are authenticate, audio.append, audio.commit, response.cancel, and ping. Server messages are ready, audio.delta, transcript.delta, run.snapshot, approval.required, error, done, and pong. Audio is base64 mono 24-kHz signed little-endian PCM16. Events carry per-connection sequence numbers; unknown versions/types close with a protocol error.

Version-1 frame schemas

Every frame is a JSON object with an integer version set to 1 and a string type. Server frames additionally carry a monotonically increasing integer sequence scoped to the WebSocket connection. The following examples show the complete public frame shapes; omitted optional values are not sent.

Client frames:

{"version":1,"type":"authenticate","ticket":"<one-use voice ticket>"}
{"version":1,"type":"audio.append","audio":"<base64 PCM16 bytes>"}
{"version":1,"type":"audio.commit"}
{"version":1,"type":"response.cancel"}
{"version":1,"type":"ping"}

The authenticate ticket is the opaque value returned by CreateVoiceConnectionTicket; send it only once on the matching connection. Each audio.append frame contains only base64-encoded mono 24-kHz signed little-endian PCM16 audio. Commit ends the current input segment, cancel is best effort, and ping requests a pong.

Server frames use these shapes:

{"version":1,"type":"ready","sequence":1,"sessionId":{"value":"01900000-0000-7000-8000-000000000001"}}
{"version":1,"type":"audio.delta","sequence":2,"audio":"<base64 PCM16 bytes>"}
{"version":1,"type":"transcript.delta","sequence":3,"text":"Hello","final":false}
{"version":1,"type":"run.snapshot","sequence":4,"run":{"runId":{"value":"01900000-0000-7000-8000-000000000001"},"state":"RUN_STATE_RUNNING"}}
{"version":1,"type":"approval.required","sequence":5,"approval":{"approvalId":{"value":"01900000-0000-7000-8000-000000000001"},"state":"APPROVAL_STATE_PENDING"}}
{"version":1,"type":"error","sequence":6,"code":"failed_precondition","message":"approval required","error":{"reason":"ERROR_REASON_APPROVAL_REQUIRED"}}
{"version":1,"type":"done","sequence":7,"runId":{"value":"01900000-0000-7000-8000-000000000001"}}
{"version":1,"type":"pong","sequence":8}

transcript.delta.final marks the final transcript fragment. Each provider response ends with an empty fragment whose final is true; append fragments without repeating the accumulated transcript. Tool-only and canceled responses also send this marker while the connection remains open. Run snapshots and approval objects use the same public fields and enum values as the Connect reference. Error frames carry the Connect code, human-readable message, and an ErrorDetail object when available. A client must reject unknown versions or message types as protocol errors and must not reuse a voice ticket after authentication or reconnect.

The browser connects only to AutoMCP. AutoMCP uses a server WebSocket to OpenAI Realtime, keeps authorization, tools, approvals, quotas, and settlement in the same Run path, and relays audio without storing original audio. Cancel is best effort and cannot represent a completed external tool effect as undone. A disconnect ends the voice connection but preserves recorded tool results; start voice again on a new connection.

The browser sends at least 100 milliseconds of mono PCM16 before audio.commit. AutoMCP creates the Run before connecting to the provider and controls response creation and sequential tools. Wait for ready before the next turn. The playground resamples microphone input to 24 kHz, plays returned audio, and lets you interrupt playback or disconnect. Interruption does not undo completed tools. Input transcription and voice response usage are accounted separately from actual provider usage; original PCM audio is never stored.