Voice schemas

The full schema and model definitions referenced by the Audio endpoints. Each endpoint page links here for the detailed shape of its request and response objects.

Schemas

Audio Progress Event

One update on the independent audio-progress channel, multiplexed onto the same ordered event stream as transcript, lifecycle, and speaker events. Not part of any speech turn.

FieldTypeRequiredDescription
typeenum ('audioProgress')YesEvent discriminator; always audioProgress for this event.
audioProcessedMsinteger (int64)YesTotal audio processed so far, in milliseconds from the start of the stream.

Authorization

Credential authorizing the session. Consumed only by the server's authentication step and never forwarded to the model.

FieldTypeRequiredDescription
accessTokenstringYesBearer followed by your Model API key. The prefix is part of the value.

Error Event

Fatal error the server sends just before it closes the session. The message is client-safe; internal detail is logged server-side only.

FieldTypeRequiredDescription
typeenum ('error')YesEvent discriminator; always error for this event.
messagestringYesHuman-readable, client-safe error message.
sessionIdstringYesSession id for log correlation. Empty if one has not been assigned yet.
errorTypestringNoModel API error taxonomy for this failure.
errorCodestringNoMachine-readable error code, when the failure has one.
errorParamstringNoRequest field the error relates to, when applicable.

Realtime Handshake Request

The first JSON text frame the client sends to open a realtime session, within 10 seconds of the socket opening. Configuration is fixed once the handshake is accepted.

FieldTypeRequiredDescription
authorizationAuthorizationYes
audioEncodingenum ('PCM_24KHZ', 'PCM_16KHZ')YesEncoding of the streamed binary frames, sent as the enum name. Both values are signed 16-bit little-endian mono. PCM_24KHZ is 48,000 bytes per second and is the model's native rate; PCM_16KHZ is 32,000 bytes per second and is resampled server-side. There is no default; an unset or unrecognized value is rejected.
modelstringYesPublic model id. The model must support the requested mode.
modeenum ('PUSH_TO_TALK', 'ENDPOINTING', 'DIARIZATION')NoTranscription behavior, sent as the enum name. PUSH_TO_TALK is single-turn and the client delimits the turn by ending the stream. ENDPOINTING detects speech onset and endpoint, one turn per detected segment. DIARIZATION additionally attributes turns to speakers. Mode availability depends on the model. (default: PUSH_TO_TALK)
partialModeenum ('CUMULATIVE', 'DELTA')NoRepresentation of partial transcript text, sent as the enum name. CUMULATIVE sends the complete current hypothesis each time, replacing the previous partial, so the model can revise text it already emitted. DELTA sends only newly emitted text for the client to append, and is not compatible with every model or mode. (default: CUMULATIVE)
emitAudioProgressbooleanNoWhether the server emits audioProgress events. Compatible runtimes emit one event per processed audio chunk. (default: true)
keywordsarray of stringNoTerms to bias recognition toward, such as names, jargon, and product words the model would otherwise mishear. Biasing does not guarantee an exact spelling.
languageBiasarray of stringNoLanguages to bias transcription toward, each as a language name, e.g. ["English", "French"]. A list of languages, not free-form context. Omit it to let the model detect the language.

Realtime Handshake Response

Server reply to a successful handshake, sent before any transcript frames. This is the only server frame with no type field.

FieldTypeRequiredDescription
sessionIdstringYesSession id for end-to-end log correlation.

Server Message

Envelope for every server event after the handshake. The type field names the event and its payload is merged alongside it. Transcript, lifecycle, speaker, and progress events are multiplexed into one ordered stream. Dispatch on type and ignore unknown values.

Type: TranscriptEvent | SpeechStartEvent | SpeechEndEvent | SpeechCompleteEvent | SpeakerEvent | AudioProgressEvent | ErrorEvent

Speaker Event

Labels the transcript span immediately before it: the span starts at the previous speechStart or speaker event, whichever came later, and ends here. Emitted in DIARIZATION. Does not indicate a speech boundary, a speaker change, or a final transcript, and the same label can repeat.

FieldTypeRequiredDescription
typeenum ('speaker')YesEvent discriminator; always speaker for this event.
labelstringYesModel-generated speaker label, such as A. Meaningful only within one session, and not a verified identity.
audioProcessedMsinteger (int64)YesAudio processed when the model emitted this label, in milliseconds from the start of the stream. Not a precise acoustic boundary.

Speech Complete Event

The completed transcript for one speech turn, including any post processing.

FieldTypeRequiredDescription
typeenum ('speechComplete')YesEvent discriminator; always speechComplete for this event.
audioProcessedMsinteger (int64)YesAudio processed when the model emitted this event, in milliseconds from the start of the stream. Not a precise acoustic boundary.
turnIdinteger (int32)YesId for this speech turn. Correlate lifecycle events by equality within the session; numbering is not otherwise meaningful.
transcriptstringYesTranscript for the entire turn. It can differ from the last partial, because the model may post-process the turn after speech ends.

Speech End Event

The model detected the end of speech. A boundary event, not the final transcript: use speechComplete for the turn's text.

FieldTypeRequiredDescription
typeenum ('speechEnd')YesEvent discriminator; always speechEnd for this event.
audioProcessedMsinteger (int64)YesAudio processed when the model emitted this event, in milliseconds from the start of the stream. Not a precise acoustic boundary.
turnIdinteger (int32)YesId for this speech turn.

Speech Start Event

The model detected the beginning of speech.

FieldTypeRequiredDescription
typeenum ('speechStart')YesEvent discriminator; always speechStart for this event.
audioProcessedMsinteger (int64)YesAudio processed when the model emitted this event, in milliseconds from the start of the stream. Not a precise acoustic boundary.
turnIdinteger (int32)YesId for this speech turn. A later turn can open before an earlier turn's speechComplete arrives, so keep state keyed by turnId.

Transcribe Request

The request part of the multipart body, sent as JSON.

FieldTypeRequiredDescription
modelstringYesPublic model id. The model must support the requested mode.
audioEncodingenum ('WAV')YesContainer of the uploaded audio part, sent as the enum name. WAV is a RIFF/WAVE container holding mono integer PCM at 16 kHz or 24 kHz. There is no default; an unset or unrecognized value is rejected.
modeenum ('PUSH_TO_TALK', 'ENDPOINTING', 'DIARIZATION')NoTranscription behavior, sent as the enum name. PUSH_TO_TALK is single-turn and the uploaded clip is the turn. ENDPOINTING detects speech onset and endpoint, one turn per detected segment. DIARIZATION additionally attributes turns to speakers. Mode availability depends on the model. (default: PUSH_TO_TALK)
keywordsarray of stringNoTerms to bias recognition toward, such as names, jargon, and product words the model would otherwise mishear. Biasing does not guarantee an exact spelling.
languageBiasarray of stringNoLanguages to bias transcription toward, each as a language name, e.g. ["English", "French"]. A list of languages, not free-form context. Omit it to let the model detect the language.
partialModeenum ('CUMULATIVE', 'DELTA')NoRepresentation of partial transcript text, sent as the enum name. Applies to text/event-stream responses only. CUMULATIVE replaces the previous partial; DELTA sends only newly emitted text for the client to append. (default: CUMULATIVE)
emitAudioProgressbooleanNoWhether to emit audioProgress events. Applies to text/event-stream responses only; the buffered responses never surface them. (default: true)

Transcribe Response

The buffered application/json response.

FieldTypeRequiredDescription
sessionIdstringYesThe sessionId query parameter, or the id the server generated when it was absent.
transcriptstringYesFinal transcript for the whole clip. Populated in every mode; in the multi-turn modes it is the turn transcripts joined in turn order.
audioDurationMsinteger (int64)YesTotal audio duration processed, in milliseconds.
turnsarray of TurnYesEvery turn the model reported, in ascending turnId order. Empty in PUSH_TO_TALK. A turn the clip ended part-way through carries the boundaries the model gave and an empty transcript.

Transcript Event

One streamed transcript update.

FieldTypeRequiredDescription
typeenum ('transcript')YesEvent discriminator; always transcript for this event.
transcriptstringYesTranscript text for this segment. Under CUMULATIVE it replaces the previous partial; under DELTA it is appended.
finalbooleanYesTranscript stability as reported by the model. In PUSH_TO_TALK, true marks stream completion. In ENDPOINTING and DIARIZATION, use speechComplete for turn completion instead.
audioProcessedMsinteger (int64)YesTotal audio processed so far, in milliseconds.

Turn

One speech turn the model detected, reported in the buffered transcribe response. Populated in ENDPOINTING and DIARIZATION only.

FieldTypeRequiredDescription
turnIdinteger (int32)YesId for this turn. Turns are reported in ascending id order; numbering is not otherwise meaningful.
startMsinteger (int64)YesAudio processed when the model detected the turn's speech onset, in milliseconds from the start of the clip. Not a precise acoustic boundary.
endMsinteger (int64)YesAudio processed when the model detected the turn's speech end, in milliseconds from the start of the clip. Not a precise acoustic boundary.
transcriptstringYesFinalized transcript for this turn, including any post processing.
speakerstringNoModel-generated speaker label, such as A. Present in DIARIZATION only.