Error Handling
KugelAudioError:
Data Models
All models are importable fromkugelaudio (e.g. from kugelaudio import AudioChunk, StreamConfig).
AudioChunk
Represents a single audio chunk from streaming:AudioResponse
Complete audio response from generation:ulaw_8000 or alaw_8000, consume audio as raw G.711 bytes instead.
WordTimestamp
Word-level time alignment for a generated audio chunk:SessionUsage
Per-conversation usage for billing your own customers. Available onStreamingSession.last_usage (per session), MultiContextSession.usage_for(...)
(per context), and AudioResponse.usage (per generate() request).
cost_cents is None (and cost_available is False) when the charge
cannot be determined at session end — e.g. a transient billing error or an
internal session. It is never a misleading 0. audio_seconds is always
reported, so you can still reconcile from the audio you received.Model
TTS model information (returned byclient.models.list()):
StreamConfig
Configuration object for streaming sessions. The session factories accept the common generation fields directly. UseStreamConfig with
session.update_config() before the first send when setting advanced fields
such as output_format, max_buffer_length, chunk_length_schedule, or
auto_mode.
Dictionary, DictionaryEntry & results
Enums
category, sex, and age on voice models are string enums defined in
kugelaudio.models:
These are the SDK’s legacy response enums, not the API’s current create/update
validation set. In particular, the API returns
middle_age and may return
newer categories not declared by VoiceCategory; an unrecognized category
deserializes as CLONED. Use the Voice API
reference for accepted write values.VoiceListResponse
Paginated response fromvoices.list():
Voice
Voice information (items invoices.list().voices):
VoiceDetail
Extended voice information returned byget, create, update, and publish:
VoiceReference
Voice reference audio metadata:Next steps
- Quickstart — install and first generation
- Streaming — where
StreamConfigandSessionUsageare used