{ "opencollection": "1.0.0", "info": { "name": "Telnyx Access Tokens Text To Speech Commands API", "version": "2.0.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Text To Speech Commands", "type": "folder" }, "items": [ { "info": { "name": "Stream text to speech over WebSocket", "type": "http" }, "http": { "method": "GET", "url": "https://api.telnyx.com/v2/text-to-speech/speech", "params": [ { "name": "voice", "value": "", "type": "query", "description": "Voice identifier in the format `provider.model_id.voice_id` or `provider.voice_id` (e.g. `telnyx.NaturalHD.Telnyx_Alloy`, `Telnyx.Ultra.`, or `azure.en-US-AvaMultilingualNeural`). When provided, the `provider`, `model_id`, and `voice_id` are extracted automatically. Takes precedence over individual `provider`/`model_id`/`voice_id` parameters." }, { "name": "provider", "value": "", "type": "query", "description": "TTS provider. Defaults to `telnyx` if not specified. Ignored when `voice` is provided." }, { "name": "model_id", "value": "", "type": "query", "description": "Model identifier for the chosen provider. Examples: `Natural`, `NaturalHD`, `Ultra` (Telnyx); `Polly.Generative` (AWS)." }, { "name": "voice_id", "value": "", "type": "query", "description": "Voice identifier for the chosen provider." }, { "name": "disable_cache", "value": "", "type": "query", "description": "When `true`, bypass the audio cache and generate fresh audio." }, { "name": "audio_format", "value": "", "type": "query", "description": "Audio output format override. Supported for Telnyx models. `pcm` and `wav` are available for `Natural`/`NaturalHD` models. The `Ultra` model outputs PCM at 24kHz s16le or MP3 at 128kbps 24kHz." }, { "name": "socket_id", "value": "", "type": "query", "description": "Client-provided socket identifier for tracking. If not provided, one is generated server-side." } ] }, "docs": "Open a WebSocket connection to stream text and receive synthesized audio in real time. Authentication is provided via the standard `Authorization: Bearer ` header. Send JSON frames with text to synthesize; receive JSON frames containing base64-encoded audio chunks.\n\nSupported providers: `aws`, `telnyx`, `azure`, `murfai`, `minimax`, `rime`, `resemble`, `elevenlabs`, `xai`.\n\n**Connection flow:**\n1. Open WebSocket with query parameters specifying provider, voice, and model.\n2. Send an ini" }, { "info": { "name": "Generate speech from text", "type": "http" }, "http": { "method": "POST", "url": "https://api.telnyx.com/v2/text-to-speech/speech", "body": { "type": "json", "data": "{}" } }, "docs": "Generate synthesized speech audio from text input. Returns audio in the requested format (binary audio stream, base64-encoded JSON, or an audio URL for later retrieval).\n\nAuthentication is provided via the standard `Authorization: Bearer ` header.\n\nThe `voice` parameter provides a convenient shorthand to specify provider, model, and voice in a single string (e.g. `telnyx.NaturalHD.Alloy` or `Telnyx.Ultra.`). Alternatively, specify `provider` explicitly along with provider-spec" }, { "info": { "name": "List available voices", "type": "http" }, "http": { "method": "GET", "url": "https://api.telnyx.com/v2/text-to-speech/voices", "params": [ { "name": "provider", "value": "", "type": "query", "description": "Filter voices by provider. If omitted, voices from all providers are returned." }, { "name": "api_key", "value": "", "type": "query", "description": "API key for providers that require one to list voices (e.g. ElevenLabs)." } ] }, "docs": "Retrieve a list of available voices from one or all TTS providers. When `provider` is specified, returns voices for that provider only. Otherwise, returns voices from all providers.\n\nSome providers (ElevenLabs, Resemble) require an API key to list voices." } ] } ], "bundled": true }