Error Handling
KugelAudioError and carry a machine-readable code. The
package also exports the ErrorCodes and WsCloseCodes constant maps for
matching specific codes when you need finer-grained handling than the classes
above.
KugelAudioOptions
GenerateOptions
Using
normalize: true without language may cause incorrect normalizations. Always specify language when you know it.AudioChunk
WordTimestamp
AudioResponse
GenerationStats
SessionUsage
Per-conversation usage for billing your own customers. Available onStreamingSession.lastUsage (per session), MultiContextSession.usageFor(...)
and the onContextClosed callback (per context), and GenerationStats.usage
(per one-shot stream() request).
costCents is null (and costAvailable 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. audioSeconds is always reported.StreamCallbacks
Used with the one-shotclient.tts.stream() endpoint:
StreamConfig
Configuration forclient.tts.streamingSession() (LLM integration endpoint):
StreamingSessionCallbacks
Model
VoiceListResponse
Paginated response fromvoices.list():
Voice
VoiceDetail
Extended voice information returned bycreate, update, get, and publish:
VoiceReference
CreateVoiceOptions
UpdateVoiceOptions
The SDK serializes
isPublic from UpdateVoiceOptions, but the current API
ignores that field on voice updates. Use voices.publish() to make a voice
public. The API’s generative_voice_description write field is not exposed
by CreateVoiceOptions or UpdateVoiceOptions.Dictionary types live on the Dictionaries page; multi-context types live on the Streaming Sessions page.