Audio Formats

Format Reference

Shunya TTS supports seven output formats. Choose the one that best fits your transport, latency, and quality requirements.


Supported Formats

FORMATVALUECONTENT-TYPESAMPLE RATEBEST FOR
MP3mp3audio/mpeg16 kHzWeb playback, notifications, general use
PCMpcmaudio/pcm16 kHzReal-time voice agents, lowest latency
WAVwavaudio/wav16 kHzPost-production, editing, lossless quality
Ogg Opusogg_opusaudio/ogg16 kHzWeb streaming, low bandwidth
FLACflacaudio/flac16 kHzArchival, lossless compression
mu-lawmulawaudio/basic8 kHzTwilio, Indian PSTN telephony
A-lawalawaudio/alaw8 kHzEuropean PSTN telephony

Notes

  • pcm delivers raw 16-bit signed little-endian samples with no header -- ideal for real-time pipelines.
  • mulaw and alaw are 8 kHz mono, matching telephony network expectations.
  • The default format is mp3 when no response_format is specified.