Skip to main content

Overview

The voices.get() method returns metadata about a specific voice, including its name, category, labels, samples, and other configuration details.

Method Signature

client.voices.get(
    voice_id: str,
    with_settings: Optional[bool] = None,
    request_options: Optional[RequestOptions] = None
) -> Voice

Parameters

Returns

Voice
object
Voice object containing detailed metadata about the voice.

Examples

Basic Usage

Retrieve metadata for a specific voice:
from elevenlabs import ElevenLabs

client = ElevenLabs(api_key="YOUR_API_KEY")

voice = client.voices.get(voice_id="21m00Tcm4TlvDq8ikWAM")

print(f"Voice: {voice.name}")
print(f"Category: {voice.category}")
print(f"Description: {voice.description}")

Access Voice Labels

Retrieve and display voice labels:
from elevenlabs import ElevenLabs

client = ElevenLabs(api_key="YOUR_API_KEY")

voice = client.voices.get(voice_id="21m00Tcm4TlvDq8ikWAM")

if voice.labels:
    print("Voice Labels:")
    for key, value in voice.labels.items():
        print(f"  {key}: {value}")

Check Voice Settings

Inspect the current settings for a voice:
from elevenlabs import ElevenLabs

client = ElevenLabs(api_key="YOUR_API_KEY")

voice = client.voices.get(voice_id="21m00Tcm4TlvDq8ikWAM")

if voice.settings:
    print("Voice Settings:")
    print(f"  Stability: {voice.settings.stability}")
    print(f"  Similarity Boost: {voice.settings.similarity_boost}")
    print(f"  Style: {voice.settings.style}")
    print(f"  Speed: {voice.settings.speed}")
    print(f"  Speaker Boost: {voice.settings.use_speaker_boost}")

List Voice Samples

Retrieve information about voice samples:
from elevenlabs import ElevenLabs

client = ElevenLabs(api_key="YOUR_API_KEY")

voice = client.voices.get(voice_id="21m00Tcm4TlvDq8ikWAM")

if voice.samples:
    print(f"Voice has {len(voice.samples)} samples:")
    for sample in voice.samples:
        print(f"  - {sample.file_name} ({sample.size_bytes} bytes)")

Check Ownership

Verify if you own a voice:
from elevenlabs import ElevenLabs

client = ElevenLabs(api_key="YOUR_API_KEY")

voice = client.voices.get(voice_id="21m00Tcm4TlvDq8ikWAM")

if voice.is_owner:
    print(f"You own the voice: {voice.name}")
else:
    print(f"This is a shared or default voice: {voice.name}")

Async Usage

Retrieve voice metadata asynchronously:
import asyncio
from elevenlabs import AsyncElevenLabs

client = AsyncElevenLabs(api_key="YOUR_API_KEY")

async def main():
    voice = await client.voices.get(voice_id="21m00Tcm4TlvDq8ikWAM")
    print(f"Voice: {voice.name}")
    print(f"Category: {voice.category}")

asyncio.run(main())

Build docs developers (and LLMs) love