Skip to main content

Prerequisites

Before you begin, make sure you have:
  • An API key from kugelaudio.com
  • Python 3.9+, Node.js 18+, Java 17+, or cURL

Installation

Install the Python SDK using pip or uv:
Or with uv (recommended):

Basic Usage

Initialize the Client

Pre-connect at startup. Without client.connect(), the first TTS request pays the WebSocket handshake; subsequent requests reuse the connection. Pre-connecting moves the handshake cost to application startup, where it doesn’t affect user-perceived latency. See Latency for the numbers.

Generate Speech

Examples below use kugel-3, the canonical production model. Legacy IDs such as kugel-2.5 and kugel-2-turbo are still accepted for backwards compatibility; see Models for details.

Stream Audio

For lower latency, stream audio chunks as they’re generated:
For async applications:

Working with Voices

Pick your voice deliberately. Different voices have wildly different baseline energy, age, and warmth — a peppy DTC bot and a calm clinical agent should not share the same voice even with the same prompt. Listen to several before locking one in. Building an LLM-driven voice agent? See Voice Agent Prompting for the prompt patterns that matter most.

List Available Voices

Use a Specific Voice

Next Steps

Generate Speech

All generation options and parameters

Streaming

Real-time audio streaming techniques

Using Voices

Browse and filter available voices

Text Processing

Normalization and spell tags