2 2
3# Text to Speech3# Text to Speech
4 4
55Convert text into spoken audio with a single API call. The API supports 5 expressive voices, inline speech tags for fine-grained delivery control, and output formats from high-fidelity MP3 to telephony-optimized μ-law.Convert text into spoken audio with a single API call. The API supports a rich set of expressive voices, inline speech tags for fine-grained delivery control, and output formats from high-fidelity MP3 to telephony-optimized μ-law.
6 6
7## Quick Start7## Quick Start
8 8
128 128
129## Voices129## Voices
130 130
131131Five voices are available, each with a distinct personality. Listen to samples and choose the best fit for your use case:Each voice has a distinct personality. Listen to samples and choose the best fit for your use case (`eve` is the default):
132
133| Voice | Tone | Description | Sample |
134|-------|------|-------------|:------:|
135| **`eve`** | Energetic, upbeat | Default voice - engaging and enthusiastic | |
136| **`ara`** | Warm, friendly | Balanced and conversational | |
137| **`rex`** | Confident, clear | Professional and articulate - ideal for business | |
138| **`sal`** | Smooth, balanced | Versatile voice for a wide range of contexts | |
139| **`leo`** | Authoritative, strong | Commanding and decisive - great for instructional content | |
140 132
141Voice IDs are **case-insensitive** - `eve`, `Eve`, and `EVE` all work. [Preview all voices in the playground →](https://console.x.ai/team/default/voice/text-to-speech?campaign=voice-docs-tts)133Voice IDs are **case-insensitive** - `eve`, `Eve`, and `EVE` all work. [Preview all voices in the playground →](https://console.x.ai/team/default/voice/text-to-speech?campaign=voice-docs-tts)
142 134
143### Choosing the right voice
144
145* **`eve`** - Great default for demos, announcements, and upbeat content
146* **`ara`** - Ideal for conversational interfaces, customer support, and warm narration
147* **`rex`** - Best for business presentations, corporate communications, and tutorials
148* **`sal`** - Versatile choice for balanced delivery across different content types
149* **`leo`** - Perfect for authoritative narration, instructions, and educational content
150
151### Custom voices135### Custom voices
152 136
153Clone any voice from a short reference clip with the [Custom Voices API](/developers/model-capabilities/audio/custom-voices), or create one for free in the [console](https://console.x.ai/team/default/voice/voice-library?campaign=voice-docs-tts). To find your custom voice ID in the console, click the three-dot menu on the voice card and select **Copy Voice ID**. Then pass it as `voice_id`:137Clone any voice from a short reference clip with the [Custom Voices API](/developers/model-capabilities/audio/custom-voices), or create one for free in the [console](https://console.x.ai/team/default/voice/voice-library?campaign=voice-docs-tts). To find your custom voice ID in the console, click the three-dot menu on the voice card and select **Copy Voice ID**. Then pass it as `voice_id`: