Basic Generation
- Python
- JavaScript
- Java
- cURL
Generation Parameters
The parameters you’ll touch most often (Python/RESTsnake_case; JavaScript uses camelCase):
text(required) andmodel_id— usekugel-3voice_id— the voice to speak with (Using voices)cfg_scale— expressiveness (see the guide below)normalize+language— text normalization; always set the language when you know itword_timestamps— word-level timestampsspeed— playback speed (see Speed Control below)
CFG Scale Guide
Thecfg_scale parameter controls how closely the model follows the voice characteristics. Accepted range: 1.2–2.5 (inclusive). Values outside this range are clamped into it.
Speed Control
Thespeed parameter adjusts playback rate using pitch-preserving time-stretching (WSOLA), so the voice pitch stays natural even at different speeds. Range: 0.8 (20% slower) to 1.2 (20% faster).
- Python
- JavaScript
- Java
- cURL
Speed applies to the whole request; to change the rate for just part of it,
wrap that text in
<prosody rate="...">:
<break> tags,
<spell> tags, and the
unsupported-tags table.
Full Example with All Options
- Python
- JavaScript
- Java
- cURL
Async Generation
- Python
- JavaScript
- Java
- cURL
Playing Audio in the Browser
The JavaScript SDK provides utility functions for audio playback:Pre-connecting for Low Latency
For latency-sensitive applications, pre-establish the WebSocket connection at startup to keep the handshake out of your first request — see Latency.- Python (Async)
- Python (Sync)
- JavaScript
- Java
Word Timestamps
Request per-word time alignments alongside the generated audio. Useful for subtitles, karaoke, lip-sync, and barge-in handling.- Python
- JavaScript
- Java
- cURL
Next Steps
Streaming
Lower latency with real-time audio streaming
Text Processing
Text normalization and spell tags
Voices
Browse and use different voices
Models
Learn about available models