Skip to main content
Telnyx is a carrier-owned global communications platform providing infrastructure for real-time agents — voice AI, SIP trunking, programmable voice, and messaging. Fish Audio is available on Telnyx as a hosted text-to-speech provider: you synthesize Fish Audio voices directly through the Telnyx API and play them in live phone calls via Call Control and TeXML, with no Fish Audio API key required.

Prerequisites

  • A Telnyx account with an API key
  • Python 3.9 or higher with websockets 14+ (pip install websockets) for the streaming example

Voices

Telnyx exposes a curated shortlist of voices from the Fish Audio Voice Library rather than accepting arbitrary voice IDs. Voices use the format FishAudio.<Model>.<VoiceId>, where the model is s2.1-pro (latest, default), s2-pro, or s1:
All curated voices are cross-lingual — any voice can speak any language present in the input text. On S2 models, you can also control delivery with inline emotion tags like [happy] or [whispering] — see emotion control for the full syntax. See the Telnyx Fish Audio provider page for the current voice roster, supported audio formats, and sample rates.

WebSocket streaming

Stream text in and receive base64-encoded audio chunks in real time:
The handshake requests MP3 output via voice_settings; without it, audio is delivered as raw PCM at 24 kHz.

REST API

Synthesize a complete utterance with a single HTTP request:
The response streams back audio bytes. Set output_type to base64_output or audio_id for JSON responses instead.

Resources