Integration guide

Telnyx Text to Speech: Custom AI Voice Setup (2026)

Plan Telnyx text to speech with Fish Audio: evaluate call control, media streaming, voice identity, codecs, latency, fallback and cost separation.

Nov 3, 2026 Updated Nov 3, 2026

Telnyx text to speech can use Telnyx's own TTS API and supported voice engines, or it can sit on the telephony side of an application that generates audio elsewhere. Fish Audio fits the second model when the team needs a specific expressive or cloned voice and can operate the media bridge.

This is not a claim of a native Fish Audio provider listing. It is a source-checked integration plan based on Telnyx's current REST, WebSocket and Voice API surfaces.

A cream generation core sends a coral waveform through a carrier gateway into a telephone handset

What does Telnyx provide?

Telnyx provides phone numbers, call control, programmable voice, media streaming and a TTS API with access to several native or provider voice engines. Fish Audio provides expressive synthesis and reusable voice identity through a separate API.

The current official Telnyx TTS product describes REST generation, WebSocket streaming and in-call playback. The Telnyx Voice API documents call control and bidirectional media streaming over WebSockets.

Choose the boundary before writing code:

ArchitectureTelephony and mediaSpeech generationBest when
Telnyx native TTSTelnyxTelnyx-supported modelThe listed voice meets the product brief
Fish Audio with media bridgeTelnyxFish AudioA specific Fish voice is required and the media path is supported
Pre-generated Fish promptsTelnyx playbackFish AudioPrompts are fixed and can be hosted as approved audio files

How does a Telnyx call receive generated speech?

For fixed IVR prompts, generate audio ahead of time, store it behind authenticated or controlled HTTPS delivery, and play the approved file through the call path. This removes live model latency from the caller experience.

For dynamic replies:

  1. Telnyx accepts and routes the call.
  2. Your backend captures or receives caller audio.
  3. The agent creates a short text response.
  4. Fish Audio streams speech.
  5. The adapter sends the required PCM or supported media format through Telnyx.
  6. A new caller turn cancels stale playback.

Keep model and provider credentials on the server. The call client must not receive a Fish Audio API key.

What audio format should the adapter use?

Use the exact media contract Telnyx requires for the selected product. Do not infer it from the voice API website or a browser player.

Telephone-ready paths commonly involve 8 kHz narrowband audio, while AI pipelines may generate at 16 kHz or 24 kHz before downsampling. Confirm:

  • sample rate;
  • mono or stereo;
  • signedness and byte order;
  • container versus raw PCM;
  • frame size and WebSocket message framing;
  • whether resampling is allowed before transport.

The telephony TTS API guide documents the sample-rate and PCM failures that sound like static or chipmunk audio.

How should you compare Telnyx's native engines with Fish Audio?

Use one script set and the same phone path. Test a greeting, a long answer, a product name, a price and an interruption.

Telnyx native TTS simplifies vendor and credential management. It is the better default when a current Telnyx voice meets the brand, language and rights requirements. Fish Audio is the better fit when a specific reusable voice, cloning workflow or very large voice library is the hard requirement.

Do not compare isolated provider demos. A voice that sounds better in a browser may lose its advantage after audio conversion, network transport and telephone compression.

How do you handle interruption and fallback?

Telnyx must stop or discard queued audio when the caller starts speaking. Your adapter must cancel the Fish Audio request and prevent late chunks from the old turn from playing.

At minimum, test:

  • caller speech while Fish Audio is generating;
  • caller speech after playback begins;
  • a Fish Audio timeout or invalid voice;
  • Telnyx WebSocket disconnect;
  • fallback to a native Telnyx voice or a short pre-recorded message;
  • human transfer with transcript context.

See voice-agent TTS fallback for a fault-injection matrix.

How should pricing be compared?

Fish Audio uses one-time credits; API access begins with the $99 Studio pack. Telnyx prices calls, numbers, media and TTS under its current account terms.

Calculate:

  1. generated characters for every reply, including retries;
  2. Telnyx number and call-control charges;
  3. media or streaming charges;
  4. adapter hosting and monitoring;
  5. fallback-vendor usage;
  6. engineering time for credentials and audio conversion.

The TTS API pricing guide covers Fish Audio character budgeting.

What should launch monitoring include?

Track p50 and p95 first-audio latency, dropped media frames, audio-format errors, generation failures, interruptions, fallback rate and cost per completed call.

Keep a call-level correlation ID across Telnyx call control and Fish Audio generation. Do not log API keys, raw media or complete transcripts without a defined retention policy.

Review recordings from each selected region and phone network. A codec issue can appear on one carrier while staging from a softphone sounds correct.

Key takeaways

  • Telnyx already provides native and provider-backed TTS; Fish Audio is a separate component.
  • Use a documented supported provider path or an approved media bridge.
  • REST, WebSocket and call-flow playback solve different latency and architecture problems.
  • Normalize PCM or encoded audio for the exact Telnyx media contract.
  • Budget Fish Audio credits and Telnyx telephony separately.

Frequently asked questions

Can Telnyx use Fish Audio for text to speech?

Telnyx has its own TTS API and supported voice engines. Fish Audio is a separate API; use a documented provider path or a media bridge that the application can operate.

Does Fish Audio have a native Telnyx integration?

No native Fish Audio integration is claimed here. Verify the current Telnyx provider list before treating one service as native to the other.

Which Telnyx path fits generated speech?

Telnyx documents REST TTS, WebSocket streaming and playback through Voice API or TeXML. Select the path that matches the current voice model, audio format and credential contract.

How should latency be measured?

Measure p95 from the caller's final syllable to the first audible reply, including Telnyx transport, Fish Audio generation, buffering and playback.

How is cost split between Telnyx and Fish Audio?

Fish Audio uses prepaid character credits. Telnyx charges for numbers, calls, media and TTS under its current pricing.

Telnyx Text to Speech: Custom AI Voice Setup (2026)