Docs /Templates/ sinapsis-elevenlabs

ElevenLabsVoiceClone

sinapsis-elevenlabsElevenlabsaudioelevenlabsspeechtext_to_speech

Python template · sinapsis_elevenlabs.templates.elevenlabs_voice_clone

Overview

Template to clone a voice using the ElevenLabs API.

This template allows you to create a new custom voice in ElevenLabs by providing one or more audio samples. The cloned voice can then be used for subsequent text-to-speech synthesis within the Sinapsis pipeline.

Capabilities

Capabilities: not set

Installation

Install the published package using pip or uv.

Terminalbash
pip install sinapsis-elevenlabs==1.0.0
uv pip install sinapsis-elevenlabs==1.0.0
uv add sinapsis-elevenlabs==1.0.0

Configuration

Effective fields from the inspector schema, including nested Pydantic model fields.

name

Name for the cloned voice. If None, a default name may be used.

str | None
Optional
Default: null
model
typing.Literal['eleven_turbo_v2_5', 'eleven_multilingual_v2', 'eleven_turbo_v2', 'eleven_monolingual_v1', 'eleven_multilingual_v1']
Optional
Default: "eleven_turbo_v2_5"
voice
str | elevenlabs.types.voice.Voice | None
Optional
Default: null
stream
bool
Optional
Default: false
api_key
str | None
Optional
Default: null
metadata
sinapsis_core.template_base.base_models.TemplateMetadata | None
Optional
Default: null
description

Description for the cloned voice. Optional.

str | None
Optional
Default: null
output_format
typing.Union[typing.Literal['mp3_22050_32', 'mp3_44100_32', 'mp3_44100_64', 'mp3_44100_96', 'mp3_44100_128', 'mp3_44100_192', 'pcm_16000', 'pcm_22050', 'pcm_24000', 'pcm_44100', 'ulaw_8000'], typing.Any]
Optional
Default: "mp3_44100_128"
voice_settings
VoiceSettings
Optional
Default: null
speed
typing.Optional[float]
Optional
Default: null
style
typing.Optional[float]
Optional
Default: null
stability
typing.Optional[float]
Optional
Default: null
clone_strength
typing.Optional[float]
Optional
Default: null
similarity_boost
typing.Optional[float]
Optional
Default: null
use_speaker_boost
typing.Optional[bool]
Optional
Default: null
remove_background_noise

Whether to remove background noise from samples. Defaults to False.

bool
Optional
Default: false

Configuration example

Example from the Python docstring:

yaml
agent:
name: my_test_agent
templates:
- template_name: InputTemplate
  class_name: InputTemplate
  attributes: {}
- template_name: ElevenLabsVoiceClone
  class_name: ElevenLabsVoiceClone
  template_input: InputTemplate
  attributes:
    api_key: null
    model: eleven_turbo_v2_5
    output_format: mp3_44100_128
    stream: false
    voice: null
    voice_settings:
        stability: null
        similarity_boost: null
        style: null
        use_speaker_boost: null
        speed: null
    name: null
    description: null
    remove_background_noise: false
Show schema-based configuration skeleton
yaml
templates:
  - template_name: "ElevenLabsVoiceClone"
    class_name: "ElevenLabsVoiceClone"
    attributes:
      name: null
      model: "eleven_turbo_v2_5"
      voice: null
      stream: false
      api_key: null
      description: null
      output_format: "mp3_44100_128"
      voice_settings:
        speed: null
        style: null
        stability: null
        clone_strength: null
        similarity_boost: null
        use_speaker_boost: null
      remove_background_noise: false

Inheritance

Immediate parent: sinapsis_elevenlabs.templates.elevenlabs_tts.ElevenLabsTTS

Environment variables

Environment definitions belong to their canonical Python modules.

No directly related environment variables listed.