Skip to main content
Telnyx provides streaming text-to-speech over WebSocket. The plugin opens a new socket per synthesis call, decodes MP3 audio to PcmData as it streams, and takes the output sample rate from the decoder so the voice controls the rate.
Vision Agents uses Stream Video for real-time WebRTC transport by default. External WebRTC transports are supported as well. Most AI providers offer free tiers to get started.
Get your Telnyx API key from the Telnyx Mission Control Portal.
Telnyx also provides speech-to-text, an LLM, and PSTN telephony. You can use all four in the same agent.

Installation

Quick start

Set TELNYX_API_KEY in your environment or pass api_key directly.

Parameters

Audio format

The endpoint takes an audio_format parameter, but it is honoured only by some voices. AWS.Polly.* and Telnyx.NaturalHD.* serve raw PCM, while the default Telnyx.KokoroTTS.* returns MP3 regardless. Since the PCM sample rate is not reported on the wire and differs per voice, the plugin decodes MP3 for every voice rather than carrying a voice-to-rate table that would go stale.

Next steps

Telnyx STT

Streaming speech-to-text

Telnyx LLM

OpenAI-compatible chat completions

Telnyx Telephony

PSTN calls via Call Control

Build a Voice Agent

Get started with voice