Docs / Realtime API / Client events

Realtime API

Client events

The events you send on the Realtime socket. They are OpenAI’s Realtime transcription events; session.close is an addition of .wave’s.

Events

EventWhat it does
session.updateSets the session type, audio format, language and segmentation, before the first audio. Answered by session.updated.
input_audio_buffer.appendBase64 audio in audio, in chunks of any size.
input_audio_buffer.commitEnds the current segment now.
input_audio_buffer.clearDrops audio sent but not yet transcribed.
session.closeEnds the session. An addition of .wave’s; closing the socket ends it too.

Configure with session.update

{"type": "session.update",
 "session": {"type": "transcription",
             "audio": {"input": {"format": {"type": "audio/pcm", "rate": 24000},
                                 "transcription": {"model": "nemotron-asr-streaming",
                                                   "language": "pt-BR"},
                                 "turn_detection": {"type": "server_vad",
                                                    "silence_duration_ms": 3200}}}}}
session.type
transcription.
audio.input.format
One of the audio formats; 24 kHz PCM16 by default.
audio.input.transcription.model
The model, such as nemotron-asr-streaming.
audio.input.transcription.language
A tag from the language list. Leave it out to let the model detect the language. Set it before the first audio.
audio.input.turn_detection
{"type": "server_vad", "silence_duration_ms": …}, from 400 to 3200; or null to end segments only with input_audio_buffer.commit.
Fields without effect
transcription.prompt, noise_reduction, and the threshold and prefix_padding_ms of turn_detection are accepted and returned as null. semantic_vad is refused with invalid_parameter.