Skip to main content

Default Behavior

WebSocket audio is base64-encoded in JSON frames. The default format depends on the provider and model. Use the audio_format query parameter to override:
wss://api.telnyx.com/v2/text-to-speech/speech?voice=Telnyx.NaturalHD.astra&audio_format=linear16

Format Support by Provider

ProviderSupported Formats
Telnyxmp3, linear16
AWS Pollymp3, linear16, ogg_vorbis
Azuremp3, wav, linear16, mulaw, alaw
ElevenLabsmp3, linear16, mulaw
Rimemp3, linear16
Minimaxmp3, linear16
Resemblemp3, wav
Inworldmp3, linear16
Qwenmp3, linear16

Accepted Sample Rates

ProviderAccepted Sample Rates
Telnyx/Rime8000, 16000, 22050, 24000, 44100, 48000, 96000
Telnyx/Cartesia8000, 16000, 22050, 24000, 44100
Telnyx/Qwen24000
Telnyx/Kokoro24000
Telnyx/LibriTTS24000
Rime (direct)8000, 16000, 22050, 24000, 44100, 48000, 96000
Qwen (direct)24000
Azure8000, 16000, 24000, 48000
AWS8000, 16000, 22050, 24000
Minimax8000, 16000, 22050, 24000, 32000, 44100
Resemble8000, 16000, 22050, 32000, 44100, 48000
Inworld8000, 16000, 22050, 24000, 44100, 48000
ElevenLabs8000, 16000, 22050, 24000, 44100