Skip to main content
WSS
/
v2
/
text-to-speech
/
speech

Documentation Index

Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt

Use this file to discover all available pages before exploring further.

Messages
bearerAuth
type:http

Telnyx API v2 Bearer token authentication.

query
type:object

Query parameters passed when opening the WebSocket connection.

Text Frame
type:object

Client-to-server frame containing text to synthesize. The initial handshake message should be {"text": " "} (single space) with optional voice_settings. Subsequent messages contain actual text. To interrupt synthesis mid-stream, send {"force": true}.

Audio Chunk Frame
type:object

Server-to-client frame containing a base64-encoded audio chunk. For providers that stream audio in real-time (Telnyx Natural/NaturalHD, Rime, Minimax, Resemble, Inworld), text will be null because audio is streamed before full text alignment is available, and cached will be false. For other providers, text contains the corresponding text segment.

Final Frame
type:object

Server-to-client frame indicating synthesis is complete for the current text. The connection remains open for additional text messages.

Error Frame
type:object

Server-to-client frame indicating an error during synthesis. The connection will be closed shortly after sending this frame.