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.

Installation

To use PlayHT services, install the required dependencies:
pip install "pipecat-ai[playht]"

Prerequisites

PlayHT Account Setup

Before using PlayHT TTS services, you need:
  1. PlayHT Account: Sign up at PlayHT Dashboard
  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