> ## Documentation Index
> Fetch the complete documentation index at: https://docs.play.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Text to Speech

> Turn text into lifelike speech with PlayAI's API

PlayAI's Text-to-Speech (TTS) service provides advanced capabilities for generating natural, human-like speech from text. Our PlayDialog model offers state-of-the-art voice synthesis with support for multiple speakers, pacing control, and real-time streaming.

## Key Features

<CardGroup cols={3}>
  <Card title="Realistic Speech" icon="waveform-lines" iconType="duotone">
    Generate lifelike speech with natural intonation and prosody
  </Card>

  <Card title="200+ Prebuilt Voices" icon="microphone-lines" iconType="duotone">
    Choose from a wide range of studio-quality voices
  </Card>

  <Card title="Multi-Speaker" icon="users" iconType="duotone">
    Support for multi-speaker dialogs
  </Card>

  <Card title="Industry-leading Voice Cloning" icon="clone" iconType="duotone">
    Create high-quality custom voices from 30-second audio samples
  </Card>

  <Card title="Real-time Streaming" icon="bolt" iconType="duotone">
    Stream audio in real-time to reduce latency
  </Card>

  <Card title="Style Control and Pacing" icon="face-smile" iconType="duotone">
    Control speech style, pacing, and emotion natively
  </Card>
</CardGroup>

## API Options

PlayAI provides multiple ways to use our TTS service:

1. **Real-time HTTP Streaming**
   * Stream audio as it's generated
   * Perfect for interactive applications
   * Low latency response

2. **Async HTTP API**
   * Generate audio files asynchronously
   * Better for longer texts
   * Background processing

3. **WebSocket API**
   * Bi-directional communication
   * Real-time streaming with control
   * Ideal for chat applications

## Getting Started

1. **Quick Start**: Follow our [TTS Quickstart](/documentation/text-to-speech/tts-quickstart) guide
2. **Create an AI Podcast**: Explore [dialog creation](/documentation/tutorials/tts/dialogs/create-ai-podcast)

## Best Practices

1. **Voice Selection**
   * Choose appropriate voices for your use case
   * Consider using voice cloning for custom voices
   * Test different voices for optimal results

2. **Performance**
   * Use streaming for real-time applications
   * Consider async API for longer texts
   * Cache frequently used audio

3. **Error Handling**
   * Implement proper error handling
   * Monitor API rate limits
   * Handle network issues gracefully

<Warning>
  If you clone a voice in one language and then use that cloned voice to generate speech in a different language, the
  output will be highly unreliable. For best results, ensure that the voice you use to generate speech matches the
  language of the text you want to generate speech for.
</Warning>

## Resources

* [Rate Limits](/documentation/resources/rate-limits)
* [Error Messages](/documentation/resources/error-messages)
* [Troubleshooting Guide](/documentation/resources/troubleshooting)
