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

# Playing the audio

> Raw PCM, and what every player needs to be told about it.

Both endpoints return **raw PCM** — 16-bit little-endian, mono, 24000 Hz, with
**no file header**. Nothing in the bytes says what they are, so every player has
to be told.

<CodeGroup>
  ```bash ffmpeg theme={null}
  ffmpeg -f s16le -ar 24000 -ac 1 -i out.pcm out.wav
  ```

  ```bash ffplay theme={null}
  ffplay -f s16le -ar 24000 -ch_layout mono out.pcm
  ```

  ```python Python theme={null}
  import wave

  with wave.open("out.wav", "wb") as w:
      w.setnchannels(1)
      w.setsampwidth(2)       # 16-bit
      w.setframerate(24000)
      w.writeframes(pcm)
  ```
</CodeGroup>

## Why not just save it as .wav

A `.wav` file is a 44-byte header followed by exactly these samples. Renaming
the file does not add the header, so a player opens it, finds no `RIFF`, and
refuses — or plays static.

<Note>
  This is also why Postman shows nothing when you preview the response. It is
  not an error: there is simply no format for the player to recognise.
</Note>

## Play it as it arrives

Do not wait for the whole body. The first bytes are usable immediately, and
playing them as they land is the difference between **88 ms** and **630 ms** of
perceived latency on a three-second clip.

```js theme={null}
for await (const chunk of res.body) {
  player.push(chunk);       // raw PCM, straight through
}
```
