Skip to main content
Telephony providers commonly send 8 kHz mono audio encoded as mu-law or A-law. Gradium supports those formats directly for STT and can produce telephony-friendly TTS output.

Choose a Voice for Phone Calls

Every catalog voice works at 8 kHz, but some keep their character on a phone line better than others. Voices tagged Telephony were picked for phone calls in native-speaker listening tests at 8 kHz.
  • Studio: in Voice catalog, open Filter › Channel › Telephony. It combines with the other filters, such as language, gender, or use case.
  • API: list them with channel=telephony on GET /voices:
Only catalog voices carry this tag. A voice without it hasn’t been tested on a phone line; it doesn’t mean the voice sounds bad there.

STT WebSocket Setup

Then send base64-encoded audio payloads:

TTS WebSocket Setup

The audio messages contain base64-encoded mu-law chunks that can be forwarded to a telephony media stream.

Chunk Size Guidance

Many telephony media streams send 20 ms frames. Gradium accepts small chunks, but batching to roughly 80 ms can reduce message overhead while keeping latency low:

Bridge Checklist

  • Preserve the provider’s stream/session ID in your own logs.
  • Use one Gradium STT session per caller audio stream.
  • Set input_format to the actual bytes you forward.
  • For TTS, request an output format your provider can play directly.
  • Use STT step messages or your provider’s VAD to decide when to send the user’s turn to an agent.
  • Close the WebSocket and start a new session if the call leg changes format.

Speech-to-Text WebSocket

Real-time transcription with VAD and flush.

Text-to-Speech WebSocket

Stream generated audio back to your telephony bridge.