Skip to main content

List Available Voices

# List all available 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}")

# Filter by language
result = client.voices.list(language="de")

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

Get a Specific Voice

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

Create a Voice

Create a new voice with optional reference audio files:
voice = client.voices.create(
    name="My Custom Voice",
    sex="female",
    description="A warm, conversational voice",
    category="cloned",
    reference_files=["reference1.wav", "reference2.wav"],
)
print(f"Created voice: {voice.id}")
The reference_files parameter accepts file paths (str or Path) to audio files (WAV, MP3, FLAC).

Update a Voice

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

Delete a Voice

client.voices.delete(voice_id=1071)

Manage Reference Audio

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

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

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

Publish a Voice

Request that your voice be made publicly available. An admin will verify it before it becomes visible to others.
voice = client.voices.publish(voice_id=1071)
print(f"Pending verification: {voice.pending_verification}")

Generate Voice Sample

Trigger sample audio generation for a voice:
voice = client.voices.generate_sample(voice_id=1071)
print(f"Sample URL: {voice.sample_url}")

Next steps