The official Python client for PlayHT's text-to-speech API. Current version 0.1.14, supports Python 3.8+. The library provides async and sync clients, WebSocket streaming, and support for PlayHT 2.0 and HD voices. Release cadence is irregular.
pip install pyhtNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize a client, create TTS options, and stream audio to a file.
Set the environment variables or pass them explicitly.
Use the full S3 URI from the PlayHT dashboard.
Use the context manager or explicitly iterate.
Implement custom retry logic or re-create the client periodically.
Stick with synchronous Client for production.
Set PLAYHT_USER_ID and PLAYHT_API_KEY environment variables, or pass them to Client().
Run 'pip install pyht' in the correct virtual environment.
Upgrade to the latest version: pip install --upgrade pyht
Call client.tts(text=..., options=options) not client.tts(text=..., options=options()).
No dependency data recorded yet.