Skip to main content
The official Python SDK for KugelAudio provides a simple, Pythonic interface for text-to-speech generation with both synchronous and asynchronous support.

Installation

Or with uv (recommended):

Quick Start

Pre-connecting for Low Latency

For latency-sensitive applications, pre-establish the WebSocket connection at startup to keep the handshake out of your first TTS request — see Latency.

Sync Applications

For synchronous code that needs connection reuse, keep a streaming session open across sends:
The synchronous generate() and stream() wrappers create and close a connection on their own event-loop thread, so client.connect() does not pre-connect those calls. Use the async API or streaming_session_sync() when connection reuse matters. See Latency for measurement guidance.

Complete Example

Next steps