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

# AssemblyAI

> AssemblyAI TTS provider — multilingual voices for English, Spanish, German, French, Italian, and Portuguese, with telephony-native audio formats.

**Voice format:** `AssemblyAI.assemblyai-tts-1.<VoiceId>`

AssemblyAI is a third-party TTS provider with streamed synthesis. Every AssemblyAI voice can speak any of the six supported languages: choose the voice for its sound, and set `language` to the language of the text. AssemblyAI does not detect the language for you.

## Voices

AssemblyAI offers 11 voices under `assemblyai-tts-1`. The default voice is `aai-jane`.

| Voice | Voice ID |
| - | - |
| Alba | `AssemblyAI.assemblyai-tts-1.aai-alba` |
| Anna | `AssemblyAI.assemblyai-tts-1.aai-anna` |
| Charles | `AssemblyAI.assemblyai-tts-1.aai-charles` |
| Eve | `AssemblyAI.assemblyai-tts-1.aai-eve` |
| George | `AssemblyAI.assemblyai-tts-1.aai-george` |
| Jane | `AssemblyAI.assemblyai-tts-1.aai-jane` |
| Jean | `AssemblyAI.assemblyai-tts-1.aai-jean` |
| Mary | `AssemblyAI.assemblyai-tts-1.aai-mary` |
| Michael | `AssemblyAI.assemblyai-tts-1.aai-michael` |
| Paul | `AssemblyAI.assemblyai-tts-1.aai-paul` |
| Vera | `AssemblyAI.assemblyai-tts-1.aai-vera` |

You can also list them with the [Voices API](https://developers.telnyx.com/api-reference/text-to-speech-commands/list-available-voices.md) or the [available voices](https://developers.telnyx.com/docs/voice/tts/available-voices.md) page:

```
GET https://api.telnyx.com/v2/text-to-speech/voices?provider=assemblyai
```

## Models

| Model | Description |
| - | - |
| `assemblyai-tts-1` | Streaming model. **Default** and the only model accepted. |

## Language

Set `language` to the two-letter ISO 639-1 code of the text. The default is `en`. A regional code such as `es-MX` is accepted and treated as `es`. Any other language is rejected with an error.

| Code | Language |
| - | - |
| `en` | English |
| `es` | Spanish |
| `de` | German |
| `fr` | French |
| `it` | Italian |
| `pt` | Portuguese |

The text is read as written. Where the reading matters, write numbers, dates, and amounts out in words: a date such as `3/4` or an amount with cents can be read in a way you did not intend.

SSML is not supported, and there are no speed, pitch, or emotion controls. Send plain text.

## Voice Settings

| Field | Type | Default | Description |
| - | - | - | - |
| `language` | string | `en` | Two-letter ISO 639-1 code of the text. |
| `audio_format` | string | `mp3` | `mp3`, `wav`, `pcm_s16le`, `pcm_mulaw`, or `pcm_alaw`. |
| `sample_rate` | integer | `24000` (`8000` for `pcm_mulaw` and `pcm_alaw`) | `8000`, `16000`, `22050`, `24000`, `44100`, or `48000`. |

## Limits

A request accepts up to 5,000 characters. Split longer text into several requests.

AssemblyAI is a third-party provider that synthesizes speech in the United States. Requests that require in-transit data locality are refused. See [Data Residency](https://developers.telnyx.com/docs/inference/data-residency.md).

***

## WebSocket

AssemblyAI is available on the [TTS WebSocket API](https://developers.telnyx.com/docs/voice/tts/websocket-streaming.md). Select the voice with the `voice` query parameter and pick the output with `audio_format` and `sample_rate`. Send `language` in `voice_settings` on the init frame.

```
wss://api.telnyx.com/v2/text-to-speech/speech?voice=AssemblyAI.assemblyai-tts-1.aai-jane&audio_format=mulaw
```

```json theme={null}
{
  "text": " ",
  "voice_settings": {
    "language": "es"
  }
}
```

See the [AssemblyAI WebSocket provider page](https://developers.telnyx.com/docs/voice/tts/websocket-streaming/providers/assemblyai) for the accepted formats and sample rates.

## REST API

### Fields

| Field | Type | Default | Description |
| - | - | - | - |
| `language` | string | `en` | Two-letter ISO 639-1 code of the text. |
| `audio_format` | string | `mp3` | `mp3`, `wav`, `pcm_s16le`, `pcm_mulaw`, or `pcm_alaw`. |
| `sample_rate` | integer | `24000` (`8000` for `pcm_mulaw` and `pcm_alaw`) | `8000`, `16000`, `22050`, `24000`, `44100`, or `48000`. |
| `output_type` | string | `binary_output` | `binary_output`, `base64_output`, or `audio_id`. |

```json theme={null}
{
  "text": "Buenos días, ¿en qué puedo ayudarle?",
  "voice": "AssemblyAI.assemblyai-tts-1.aai-eve",
  "voice_settings": {
    "language": "es",
    "audio_format": "mp3"
  }
}
```

### Response

Default (`binary_output`): chunked audio bytes.

With `output_type: "base64_output"`: JSON with base64-encoded audio.

With `output_type: "audio_id"`: JSON with an `audio_url` for deferred retrieval.

## Audio Formats & Sample Rates

| Format | Default Sample Rate (Hz) |
| - | - |
| `mp3`, `wav`, `pcm_s16le` | 24000 |
| `pcm_mulaw`, `pcm_alaw` | 8000 |

`pcm_mulaw` and `pcm_alaw` are raw G.711 with no header, so they can go straight into a call's media stream.

## In-Call Playback

AssemblyAI voices work with the Call Control `speak`, `gather_using_speak`, and conference `speak` commands, and with TeXML `<Say>`.

* Send plain text: `payload_type` must be `text`.
* Set `language` to a code for the language of the text, for example `es-ES`. Call Control takes regional codes; AssemblyAI uses the language part (`es`).

```json theme={null}
{
  "payload": "Buenos días, ¿en qué puedo ayudarle?",
  "voice": "AssemblyAI.assemblyai-tts-1.aai-eve",
  "language": "es-ES"
}
```

```xml theme={null}
<Response>
  <Say voice="AssemblyAI.assemblyai-tts-1.aai-eve" language="es-ES">Buenos días, ¿en qué puedo ayudarle?</Say>
</Response>
```

See [In-Call Playback](https://developers.telnyx.com/docs/voice/tts/in-call-playback.md) for details.

## AI Assistants

Choose an AssemblyAI voice such as `AssemblyAI.assemblyai-tts-1.aai-jane` in the assistant's voice settings, and set `language` to one of `en`, `es`, `de`, `fr`, `it`, or `pt`. Saving an assistant with any other language is rejected. Every voice speaks all six languages, so one voice can serve an assistant that changes language during a call.

> [card] [AI Assistants](https://developers.telnyx.com/docs/inference/ai-assistants/no-code-voice-assistant.md)
>
> Build voice AI assistants using AssemblyAI voices.

> [card] [TTS REST API](https://developers.telnyx.com/docs/voice/tts/rest-api.md)
>
> Generate speech directly with REST TTS requests.
