Overview
PlayHT provides realistic TTS voice generation. With LiveKit's PlayHT integration and the Agents framework, you can build AI voice applications with fluent and conversational voices.
If you're looking to build an AI voice assistant with PlayHT, check out our Voice Agent Quickstart guide and use the PlayHT TTS module as demonstrated below.
Quick reference
The following sections provide a quick reference for integrating PlayHT TTS with LiveKit. For a complete reference of all available parameters, see the plugin reference.
TTS
LiveKit's PlayHT integration provides a text-to-speech (TTS) interface. This can be used in a VoicePipelineAgent
or as a standalone speech generator.
Usage
Use the playai.tts.TTS
class to create an instance of a PlayHT TTS:
from livekit.plugins.playai import ttsplayht_tts = tts.TTS(voice="s3://voice-cloning-zero-shot/a59cb96d-bba8-4e24-81f2-e60b888a0275/charlottenarrativesaad/manifest.json",language="SPANISH",)
Parameters
This section describes some of the available parameters. For a complete reference of all available parameters, see the plugin reference.
PlayAI API key. Generate a user ID and API key in the PlayHT dashboard.
PlayAI user ID. Generate a user ID and API key in the PlayHT dashboard.
string
Required
Default: s3://voice-cloning-zero-shot/d9ff78ba-d016-47f6-b0ef-dd630f59414e/female-cs/manifest.json
URL of the voice manifest file. For a full list, see List of pre-built voices.
Name of the TTS model. For a full list, see Models.