# Audio formats

Describe the audio you send in the init body. The API reads your stream with these values: they must match it.

| field | values | default |
|---|---|---|
| `encoding` | `wav/pcm` (linear PCM), `wav/alaw`, `wav/ulaw` (G.711, telephony) | `wav/pcm` |
| `bit_depth` | `8`, `16`, `24`, `32`; `wav/alaw` and `wav/ulaw` are 8-bit | `16` |
| `sample_rate` | `8000`, `16000`, `32000`, `44100`, `48000` | `16000` |
| `channels` | `1` to `8` | `1` |

Send the samples raw, without a WAV header: little-endian, channels interleaved.

```json
{ "encoding": "wav/ulaw", "sample_rate": 8000, "bit_depth": 8, "channels": 2 }
```

## Sending the audio

- **Binary frames** (recommended): the bytes as they are.
- **JSON**: `{"type": "audio_chunk", "data": {"chunk": "<base64>"}}`, a third larger.

Any chunk size works. 100 ms per chunk is a good default: smaller chunks add overhead, larger ones delay the
transcripts. Send the audio as it is captured.

## Several channels

Each channel is transcribed on its own: utterances carry their `channel` (from `0`), and utterance ids start with
it (`01_00000004`). Put each party of a call on its own channel to know who said what without
[diarization](/features/speaker-diarization/), and with exact timing when they talk over each other.

## Acknowledgments

With `receive_acknowledgments` (on by default), the server acknowledges your audio once it is transcribed, with
`audio_chunk` messages whose `byte_range` counts the bytes since the start of the session. Keep the audio until it is
acknowledged to resend it after a network drop ([Reconnections](/live/reconnections/)).
