Prerequisites
For this tutorial, you need a Cartesia API key in your shell environment. Get your API key at https://play.cartesia.ai/keys, then run this command or add it to your.bashrc or .zshrc:
Generate a WAV file
- Python
- JavaScript
- cURL
1
Install the SDK
2
Generate speech
generate_speech.py
3
Run it
What’s next
Text-to-Speech Quickstart
Pipe LLM output to TTS in real time using WebSocket streaming.
Choose a Voice
Browse voices and learn how to pick the right one for your use case.
TTS output audio format
Pick the right output format, sample rate, and encoding for your use case.