# Source: https://docs.pipecat.ai/server/services/tts/playht.md

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

# PlayHT

> Text-to-speech services using PlayHT's WebSocket and HTTP APIs

## Overview

PlayHT provides high-quality text-to-speech synthesis with two service implementations: `PlayHTTTSService` (WebSocket-based) for real-time streaming with ultra-low latency, and `PlayHTHttpTTSService` (HTTP-based) for simpler synthesis. `PlayHTTTSService` is recommended for interactive applications requiring low latency and advanced interruption handling.

<CardGroup cols={2}>
  <Card title="PlayHT TTS API Reference" icon="code" href="https://reference-server.pipecat.ai/en/latest/api/pipecat.services.playht.tts.html">
    Pipecat's API methods for PlayHT TTS integration
  </Card>

  <Card title="Example Implementation" icon="play" href="https://github.com/pipecat-ai/pipecat/blob/main/examples/foundational/07e-interruptible-playht.py">
    Complete example with voice cloning
  </Card>

  <Card title="PlayHT Documentation" icon="book" href="https://docs.play.ht/reference/playht-tts-websocket-api">
    Official PlayHT WebSocket API documentation
  </Card>

  <Card title="Voice Cloning" icon="microphone" href="https://play.ht/app">
    Create and manage custom voices
  </Card>
</CardGroup>

## Installation

To use PlayHT services, install the required dependencies:

```bash  theme={null}
pip install "pipecat-ai[playht]"
```

## Prerequisites

### PlayHT Account Setup

Before using PlayHT TTS services, you need:

1. **PlayHT Account**: Sign up at [PlayHT Dashboard](https://play.ht/app)
2. **API Credentials**: Get your User ID and API Key from the dashboard
3. **Voice Selection**: Choose from standard voices or create custom cloned voices

### Required Environment Variables

* `PLAY_HT_USER_ID`: Your PlayHT user ID
* `PLAY_HT_API_KEY`: Your PlayHT API key for authentication