Documentation Index
Fetch the complete documentation index at: https://docs.getpatter.com/llms.txt
Use this file to discover all available pages before exploring further.
Telnyx TTS
TelnyxTTS is a streaming text-to-speech provider that talks to Telnyx’s wss://api.telnyx.com/v2/text-to-speech/speech endpoint. It implements Patter’s pipeline-mode TTSProvider interface — drop it in anywhere ElevenLabsTTS or CartesiaTTS would go.
Why use it
If you’re already on Telnyx for telephony (see Carrier — Telnyx), keeping TTS on the same vendor avoids fanning out to a third-party voice cloud:- One bill, one credential. No extra ElevenLabs / Cartesia / Rime account to manage.
- On-network audio path. Synthesised audio comes back through Telnyx’s edge instead of egressing from a third-party TTS region.
- Telnyx NaturalHD voices. Five high-quality voices are bundled (
astra,luna,atlas,hera,zeus).
Telnyx returns audio as base64-encoded MP3 frames.
TelnyxTTS.synthesize() yields raw MP3 bytes, so downstream Patter code that expects PCM should pipe through an MP3 decoder (e.g. ffmpeg / pydub). For a fully PCM-native pipeline pair Telnyx with ElevenLabsTTS.for_telnyx() or CartesiaTTS instead.Install
TelnyxTTS ships in the core getpatter package — no extras needed:
Quickstart
Constructor
| Parameter | Default | Description |
|---|---|---|
api_key / apiKey | — required | Telnyx API v2 key (Bearer token). |
voice | "Telnyx.NaturalHD.astra" | Telnyx voice ID. See supported voices. |
base_url / baseUrl | Telnyx prod URL | Override for testing. |
Voices
Telnyx ships five NaturalHD voices, exposed as aStrEnum for autocomplete in Python:
Sample rates
TelnyxTTSSampleRate enum is exposed for use with the lower-level Telnyx API calls (8000, 16000, 24000 Hz). The streaming TTS endpoint itself returns MP3 at the codec’s native rate.
Pricing
Telnyx TTS pricing is bundled with your Telnyx plan — see the Telnyx TTS pricing page. Patter does not charge a TTS line item forTelnyxTTS; the cost shows up on your Telnyx invoice alongside the carrier minutes. See Metrics for how to register a custom rate via Patter(pricing={...}) if you want it surfaced in the dashboard.
Low-level usage
See also
- TTS overview — provider table and shared concepts.
- Carrier — Telnyx — picking Telnyx as your telephony provider.
- Telnyx STT — pair this TTS with carrier-bundled STT.

