Skip to navigation

asr

Real-time speech-to-text transcription channel.

Handshake

WSS
wss://api.kotobatech.ai/v1/realtime

Authentication

AuthorizationBearer

HTTP Bearer authentication. Pass the Kotoba API key as a Bearer token via the Authorization header. Server-side use only.

Send

clientSendSessionUpdateobjectRequired

Must be sent exactly once after receiving transcription_session.created and before sending audio. Sets the input audio format, sampling rate, and transcription language.

OR
clientSendAudioobjectRequired

Sends a Base64-encoded audio chunk as a JSON frame.

OR
clientCommitAudioobjectRequired

Sent when ending audio transmission. The server processes remaining audio, completes any pending nonempty turn when turn detection is enabled, then acknowledges with input_audio_buffer.committed.

Receive

serverReceiveEventsobjectRequired
Receives session lifecycle events, transcription deltas, completed transcripts, commit notifications, and errors.
OR
serverReceiveEventsobjectRequired
Receives session lifecycle events, transcription deltas, completed transcripts, commit notifications, and errors.
OR
serverReceiveEventsobjectRequired
Receives session lifecycle events, transcription deltas, completed transcripts, commit notifications, and errors.
OR
serverReceiveEventsobjectRequired
Receives session lifecycle events, transcription deltas, completed transcripts, commit notifications, and errors.
OR
serverReceiveEventsobjectRequired
Receives session lifecycle events, transcription deltas, completed transcripts, commit notifications, and errors.
OR
serverReceiveEventsobjectRequired
Receives session lifecycle events, transcription deltas, completed transcripts, commit notifications, and errors.
OR
serverReceiveEventsobjectRequired
Receives session lifecycle events, transcription deltas, completed transcripts, commit notifications, and errors.