> ## 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.

# Text-to-Speech WebSocket query parameters

> Reference for query parameters on the Telnyx Text-to-Speech WebSocket endpoint, including voice, model, output format, and sample rate options.

All parameters are passed as query string values on the WebSocket URL. Locked at connection time — cannot be changed mid-session.

<ParamField query="voice" type="string">
  Compound voice identifier in `Provider.Model.VoiceId` format. When present, the server parses it into `provider`, `model_id`, and `voice_id` — those individual params are ignored. See [Voices](/docs/voice/tts/voices).
</ParamField>

<ParamField query="provider" type="string" default="telnyx">
  TTS provider. One of: `telnyx`, `aws`, `azure`, `elevenlabs`, `minimax`, `murfai`, `rime`, `resemble`, `inworld`. Ignored when `voice` is provided.
</ParamField>

<ParamField query="model_id" type="string">
  Model within the provider. Ignored when `voice` is provided.
</ParamField>

<ParamField query="voice_id" type="string">
  Voice ID within the model. Ignored when `voice` is provided.
</ParamField>

Use **either** `voice` (compound) **or** `provider` + `model_id` + `voice_id` (separate). If `voice` is present, it takes precedence and the individual fields are ignored.

<ParamField query="audio_format" type="string">
  Output audio format. Accepted values: `pcm`, `wav`. Only applies to Telnyx Natural and NaturalHD models — other providers control format via voice settings. See each [provider's page](/docs/voice/tts/voices) for details.
</ParamField>

<ParamField query="language" type="string">
  BCP-47 language code. Passed to the provider for multilingual voices.
</ParamField>

<ParamField query="text_type" type="string">
  Text type hint. Passed through to providers that support it (e.g., `ssml` for AWS Polly).
</ParamField>

<ParamField query="socket_id" type="string">
  Client-provided connection identifier for tracing and debugging. Also accepted as `x-socket-id` header. If omitted, the server generates a UUID.
</ParamField>

<ParamField query="disable_cache" type="boolean" default="false">
  When `true`, bypass the audio cache and always synthesize fresh audio.
</ParamField>

## Voice Settings

Provider-specific parameters (speed, pitch, emotion, etc.) are not query parameters. They are passed in the `voice_settings` object of the [initialization frame](/docs/voice/tts/websocket-streaming#2-streaming):

```json theme={null}
{
  "text": " ",
  "voice_settings": {
    "voice_speed": 1.2,
    "emotion": "happy"
  }
}
```

Available fields vary by provider. See each [provider's page](/docs/voice/tts/voices) for the full list.

## Example

```
wss://api.telnyx.com/v2/text-to-speech/speech?voice=Telnyx.NaturalHD.astra&audio_format=pcm&disable_cache=true
```
