Audio Formats

Telephony Formats

Shunya TTS provides two 8 kHz telephony-grade formats that integrate directly with PSTN gateways and cloud telephony platforms.


mu-law (mulaw)

mulaw is the standard companding algorithm for North American and Indian PSTN networks. Use this format when integrating with Twilio, Exotel, Knowlarity, or any carrier that expects G.711 mu-law audio.

  • Sample rate: 8 kHz mono
  • Bit depth: 8-bit compressed (equivalent dynamic range of ~14 bits)
  • Content-Type: audio/basic

A-law (alaw)

alaw is the ITU-T G.711 companding standard used by European PSTN networks and ISDN systems.

  • Sample rate: 8 kHz mono
  • Bit depth: 8-bit compressed
  • Content-Type: audio/alaw

Telephony Example

A typical IVR prompt using mu-law with silence trimming enabled:

python
config = TTSConfig(
    model="zero-indic", voice="Sunita",
    response_format="mulaw", trim_silence=True,
)
result = await client.tts.synthesize(
    "<Conversational> नमस्ते! अपना खाता नंबर दबाएँ।",
    config=config,
)