Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Elevenlabs Elevenlabs python IvcClient Create

From Leeroopedia
Knowledge Sources
Domains Speech_Synthesis, Voice_Cloning
Last Updated 2026-02-15 00:00 GMT

Overview

Concrete tool for creating an instant voice clone from audio samples provided by the elevenlabs-python SDK.

Description

The IvcClient.create method uploads audio sample files to the ElevenLabs API and creates a new cloned voice. It uses multipart file upload via the Fern-generated HTTP client. The method returns an AddVoiceIvcResponseModel containing the voice_id of the newly created voice, which can immediately be used for TTS generation.

Usage

Use this method to create a custom voice clone. Prepare audio sample files (clear speech recordings of the target speaker), then call this method with a name and the file list. The returned voice_id can be passed to any TTS method.

Code Reference

Source Location

  • Repository: elevenlabs-python
  • File: src/elevenlabs/voices/ivc/client.py
  • Lines: L31-88

Signature

class IvcClient:
    def create(
        self,
        *,
        name: str,
        files: typing.List[core.File],
        remove_background_noise: typing.Optional[bool] = OMIT,
        description: typing.Optional[str] = OMIT,
        labels: typing.Optional[IvcCreateRequestLabels] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AddVoiceIvcResponseModel:
        """Create a voice clone and add it to your Voices.

        Args:
            name: Display name for the cloned voice (required).
            files: Audio sample files for cloning (required).
            remove_background_noise: Apply audio isolation to samples.
            description: Voice description text.
            labels: Labels dict with keys: language, accent, gender, age.
        """

Import

from elevenlabs import ElevenLabs

client = ElevenLabs()
# Access via: client.voices.ivc.create(...)

I/O Contract

Inputs

Name Type Required Description
name str Yes Display name for the cloned voice
files List[core.File] Yes Audio sample files (file path, file-like object, or tuple of (filename, file-like, content-type))
remove_background_noise Optional[bool] No Apply audio isolation model to samples
description Optional[str] No Description of the voice
labels Optional[IvcCreateRequestLabels] No Labels dict: language, accent, gender, age

Outputs

Name Type Description
(return) AddVoiceIvcResponseModel Contains voice_id (str) of the newly created cloned voice

Usage Examples

Basic Voice Clone

from elevenlabs import ElevenLabs, play

client = ElevenLabs()

# Create voice clone from audio files
voice = client.voices.ivc.create(
    name="My Custom Voice",
    files=[open("sample1.mp3", "rb"), open("sample2.mp3", "rb")],
)

print(f"Created voice with ID: {voice.voice_id}")

# Use the cloned voice for TTS
audio = client.text_to_speech.convert(
    voice_id=voice.voice_id,
    text="Hello, this is my cloned voice speaking!",
    model_id="eleven_multilingual_v2",
)

play(audio)

With Metadata and Noise Removal

from elevenlabs import ElevenLabs

client = ElevenLabs()

voice = client.voices.ivc.create(
    name="Professional Narrator",
    files=[open("narrator_sample.wav", "rb")],
    remove_background_noise=True,
    description="Professional male narrator voice, warm tone",
    labels={
        "language": "English",
        "accent": "American",
        "gender": "Male",
        "age": "Middle-aged",
    },
)

print(f"Voice ID: {voice.voice_id}")

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment