> ## Documentation Index
> Fetch the complete documentation index at: https://developer.sanas.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Audio Format & Sending Audio

> Input requirements, real-time pacing, and PCM conversion for ProcessSamples

Audio is sent and received through a single synchronous call:

```cpp theme={null}
virtual void ProcessSamples(const std::vector<float>& inBuffer,
                            std::vector<float>& outBuffer) = 0;
```

## Input requirements

| Property      | Required value                                                     |
| ------------- | ------------------------------------------------------------------ |
| Channels      | Mono (1 channel)                                                   |
| Sample format | 32-bit float, normalised to −1.0 … +1.0                            |
| Sample rate   | 8 000, 16 000, or 48 000 Hz — must match `AudioParams.sampleRate`  |
| Frame size    | 20 ms recommended: 160 samples @ 8 kHz, 320 @ 16 kHz, 960 @ 48 kHz |

## Real-time pacing

This is a live stream. Feed approximately one frame every 20 ms, as you would from a live microphone. Sending much faster than real time can overrun server-side buffers. In a live call scenario the microphone callback provides natural pacing; when replaying a file (as in the [Quick Start](/API-Reference/Cpp-SDK/Guides/Quick-Start)), add a 20 ms sleep between frames.

## PCM conversion

```cpp theme={null}
// int16 → float
float sample = pcm16 / 32768.0f;

// float → int16 (for writing WAV output)
int16_t pcm = (int16_t)(std::max(-1.0f, std::min(1.0f, sample)) * 32767.0f);
```
