Prerequisites
Before you begin, make sure you have:- An API key: create one in the dashboard. Plans and credits are on the pricing page.
- Python 3.10+, Node.js 18+, Java 17+, or cURL (plus FFmpeg to play the raw audio cURL returns)
Installation
- Python
- TypeScript/JavaScript
- Java
- cURL
Install the Python SDK using pip or uv:Or with uv (recommended):
Basic Usage
Initialize the Client
- Python
- JavaScript
- Java
- cURL
Generate Speech
- Python
- JavaScript
- Java
- cURL
Stream Audio
For lower latency, stream audio chunks as they’re generated:- Python
- JavaScript
- Java
- cURL
Working with Voices
The examples above use voice1071. To pick another, list the voices your key
can use. The listing returns all voices, one page at a time; pass language to
get only the voices that speak it: de matches every German accent (de-DE,
de-AT), de-AT only Austrian German. See Voices for
pagination, voice details, and cloning.
- Python
- JavaScript
- Java
- cURL
Next Steps
Generate Speech
All generation options and parameters
Streaming
Real-time audio streaming techniques
Using Voices
Browse voices, paginate, and clone
Text Processing
Normalization and spell tags
Your SDK
Python
Python SDK reference
TypeScript/JavaScript
TypeScript/JavaScript SDK reference
Java
Java SDK reference