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:
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:
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.