Audio Formats
Required Format
| Parameter | Value |
|---|---|
| Encoding | PCM (signed 16-bit little-endian) |
| Sample rate | 16 000 Hz |
| Channels | Mono (1 channel) |
The server buffer uses 32 KB slots — at 16 kHz mono 16-bit PCM, 1 second of audio = 32 KB.
Converting with FFmpeg
ffmpeg -y -i input_file \
-ac 1 -acodec pcm_s16le -ar 16000 \
-f wav output_file.wav
Use - for stdin/stdout to pipe directly without writing a file:
ffmpeg -i input.mp4 -ac 1 -acodec pcm_s16le -ar 16000 -f wav - | your_streaming_script
Chunk Sizes
| Chunk size | Duration at 16 kHz | Notes |
|---|---|---|
| 4 KB | ~125 ms | Low latency |
| 32 KB | ~1 s | Matches server buffer slot size |
| 64 KB | ~2 s | Larger chunks, higher latency |
Smaller chunks produce faster responses. Larger chunks may improve accuracy at the cost of latency.