# 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

| Event | What it does |
| --- | --- |
| `session.update` | Sets the session type, audio format, language and segmentation, before the first audio. Answered by `session.updated`. |
| `input_audio_buffer.append` | Base64 audio in `audio`, in chunks of any size. |
| `input_audio_buffer.commit` | Ends the current segment now. |
| `input_audio_buffer.clear` | Drops audio sent but not yet transcribed. |
| `session.close` | Ends the session. An addition of .wave’s; closing the socket ends it too. |

## Configure with session.update

```json
{"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](https://dotwave.ai/docs/realtime/websocket/#audio-title); 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](https://dotwave.ai/docs/realtime/languages/). 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`.
