Implementation:Elevenlabs Elevenlabs python Voice Model
| Attribute | Value |
|---|---|
| Sources | src/elevenlabs/types/voice.py
|
| Domains | Voice Management, Text-to-Speech |
| Last Updated | 2026-02-15 |
Overview
Description
The Voice model is the core entity representing a voice resource in the ElevenLabs Python SDK. It is a Pydantic model (extending UncheckedBaseModel) that encapsulates all metadata associated with a voice, including its identity, configuration, sharing status, verification state, fine-tuning information, and ownership details. With over 20 fields, this is one of the most comprehensive type definitions in the SDK, serving as the primary data structure returned by voice-related API endpoints.
Usage
The Voice model is used as the response type when retrieving voice details from the ElevenLabs API. It appears in list endpoints (e.g., GetVoicesV2Response), individual voice retrieval, and as a building block for other voice-related operations. The model is frozen (immutable) and allows extra fields for forward compatibility.
Code Reference
Source Location
src/elevenlabs/types/voice.py
Class Signature
class Voice(UncheckedBaseModel):
...
Import Statement
from elevenlabs.types import Voice
Base Class
UncheckedBaseModel (from elevenlabs.core.unchecked_base_model)
I/O Contract
| Field | Type | Required | Description |
|---|---|---|---|
voice_id |
str |
Yes | The ID of the voice. |
name |
Optional[str] |
No | The name of the voice. |
samples |
Optional[List[VoiceSample]] |
No | List of samples associated with the voice. |
category |
Optional[VoiceResponseModelCategory] |
No | The category of the voice. |
fine_tuning |
Optional[FineTuningResponse] |
No | Fine-tuning information for the voice. |
labels |
Optional[Dict[str, str]] |
No | Labels associated with the voice. |
description |
Optional[str] |
No | The description of the voice. |
preview_url |
Optional[str] |
No | The preview URL of the voice. |
available_for_tiers |
Optional[List[str]] |
No | The tiers the voice is available for. |
settings |
Optional[VoiceSettings] |
No | The settings of the voice. |
sharing |
Optional[VoiceSharingResponse] |
No | The sharing information of the voice. |
high_quality_base_model_ids |
Optional[List[str]] |
No | The base model IDs for high-quality voices. |
verified_languages |
Optional[List[VerifiedVoiceLanguageResponseModel]] |
No | The verified languages of the voice. |
collection_ids |
Optional[List[str]] |
No | The IDs of collections this voice belongs to. |
safety_control |
Optional[VoiceResponseModelSafetyControl] |
No | The safety controls of the voice. |
voice_verification |
Optional[VoiceVerificationResponse] |
No | The voice verification of the voice. |
permission_on_resource |
Optional[str] |
No | The permission on the resource of the voice. |
is_owner |
Optional[bool] |
No | Whether the voice is owned by the user. |
is_legacy |
Optional[bool] |
No | Whether the voice is legacy. |
is_mixed |
Optional[bool] |
No | Whether the voice is mixed. |
favorited_at_unix |
Optional[int] |
No | Timestamp when the voice was marked as favorite in Unix time. |
created_at_unix |
Optional[int] |
No | The creation time of the voice in Unix time. |
Usage Examples
from elevenlabs import ElevenLabs
client = ElevenLabs(api_key="your_api_key")
# Retrieve a specific voice
voice = client.voices.get(voice_id="voice_abc123")
print(voice.voice_id)
print(voice.name)
print(voice.category)
# Access nested fields
if voice.sharing:
print(voice.sharing.status)
if voice.verified_languages:
for lang in voice.verified_languages:
print(lang.language, lang.model_id)
# Check ownership and status flags
if voice.is_owner:
print("You own this voice")
if voice.labels:
for key, value in voice.labels.items():
print(f"{key}: {value}")
Related Pages
- VoiceSample - Voice sample metadata referenced by the
samplesfield - VoiceSharingResponse - Voice sharing status referenced by the
sharingfield - VerifiedVoiceLanguageResponseModel - Verified language info referenced by the
verified_languagesfield - GetVoicesV2Response - Paginated voice listing that contains
Voiceobjects