Skip to content
KugelAudioDocs

Voices

List, create, update, publish, and manage voices and their reference audio

Choosing a voice and the catalog are covered in Voices; cloning and speaker consent in Voice cloning. Pass numeric voice IDs. To use a voice handle, resolve it with GET /v1/voices/{handle} and use the returned id.

List available voices

# List voices (returns VoiceListResponse)
result = client.voices.list()

for voice in result.voices:
    print(f"{voice.id}: {voice.name}")
    print(f"  Category: {voice.category}")
    print(f"  Languages: {', '.join(voice.supported_languages)}")
print(f"Showing {len(result.voices)} of {result.total}")

# Paginate
page2 = client.voices.list(limit=10, offset=10)
print(f"Page 2: {len(page2.voices)} voices (total: {page2.total})")

# Only voices that speak German
german = client.voices.list(language="de")
print(f"{german.total} German voices")

The listing returns every voice available to you, page by page (limit and offset). The language filter matches the voices' BCP-47 language tags, case-insensitively: de matches every German accent (de-DE, de-AT, de-CH), de-AT only Austrian German. The total and the pages count the filtered set. Every SDK also accepts an include-public argument (include_public, includePublic) for compatibility; it has no effect.

Get a specific voice

voice = client.voices.get(voice_id=1071)
print(f"Voice: {voice.name}")
print(f"Category: {voice.category}")

get() returns the same fields as the listing (the catalog shape). The public, verified, pending-verification and sample-text fields are only populated by create(), update() and publish(); in Java, isPublic() is always false and getReferences() is empty on get(), so use listReferences(...) for references.

Create a voice

Create a new voice with optional reference audio files:

voice = client.voices.create(
    name="My Custom Voice",
    sex="female",
    speaker_consent=True,
    description="A warm, conversational voice",
    category="conversational",
    reference_files=["reference1.wav", "reference2.wav"],
)
print(f"Created voice: {voice.id}")

Speaker consent is required on create() and on adding a reference. Pass true to confirm the speaker consent; any other value is rejected by the API with SPEAKER_CONSENT_REQUIRED.

speaker_consent is a required keyword argument on create() and add_reference(). The reference_files parameter accepts file paths (str or Path) whose extensions are WAV, MP3, OGG, M4A, or FLAC.

Update a voice

voice = client.voices.update(
    voice_id=1071,
    name="Updated Name",
    description="New description",
)

The current update endpoint (PATCH /v1/voices/{voice_id}) does not accept the public flag, even though the Python, TypeScript, Rust, C++ and Dart SDKs send one when you set it. To make a voice public, call publish() below. The API's generative_voice_description field is not exposed by the SDKs' create and update methods; use the Voice API reference when you need it.

Delete a voice

client.voices.delete(voice_id=1071)

Manage reference audio

# List references
for ref in client.voices.list_references(voice_id=1071):
    print(f"{ref.id}: {ref.reference_text}")

# Add a new reference (file is positional; accepts a str or Path)
ref = client.voices.add_reference(
    voice_id=1071,
    file="new_reference.wav",
    speaker_consent=True,
    reference_text="Optional transcript of the audio.",
)

# Delete a reference
client.voices.delete_reference(voice_id=1071, reference_id=456)

The current Java VoiceReference model maps id and reference_text correctly, but its legacy filename property is not populated by the current API response. See Voice types for the other legacy voice model fields.

Generate a sample

Generate a preview sample from the voice's sample text (or a default). The voice needs at least one uploaded reference.

# Returns a GeneratedSample: sample_s3_path and a signed, time-limited sample_url
# (None when the server could not sign one)
sample = client.voices.generate_sample(voice_id=1071)
print(f"Sample: {sample.sample_url}")

Publish a voice

Request that your voice be made publicly available. This sets pending_verification: true on the voice; an admin review decides whether it becomes visible to others. The call does not change the public flag itself.

voice = client.voices.publish(voice_id=1071)
print(f"Pending verification: {voice.pending_verification}")

Next steps