Guide ElevenLabs the complete
Text-to-Speech, voice cloning & Voice Agents
ElevenLabs is the standard for Voice AI — natural, multilingual voice, voice cloning, automatic dubbing, and real-time voice agents. In this guide you'll learn from basic TTS to building a Voice Agent that talks on the phone, including the API.
What is ElevenLabs?
ElevenLabs is a Voice AI — artificial voice — platform that is now considered the industry standard. It was founded in 2022 by Piotr Dabkowski and Mati Staniszewski, and within less than three years became synonymous with natural, high-quality AI voice. At its core is a Text-to-Speech (text-to-speech) engine that produces a voice so human that in many cases it's hard to tell it apart from a real recording of a speaker.
But ElevenLabs is much more than TTS. The platform now offers a full array of capabilities: Voice cloning (Voice Cloning) that reproduces a human voice from a short sample, automatic dubbing (Dubbing) that translates a video into another language while preserving the original speaker's voice, sound effects (Sound Effects) from a text description, and the whole stack of Conversational AI / Voice Agents — voice agents that hold a real-time conversation, including a phone connection.
ElevenLabs is truly multilingual — it supports over 30 languages, including Hebrew. This makes it especially relevant for creators and developers who want natural narration, voice bots, or dubbing content to and from a given language.
ElevenLabs is the leading player, but not the only one. For Voice Agent infrastructure you'll also find Vapi and LiveKit Agents (orchestration and telephony), and competing TTS engines like Cartesia, PlayHT and Inworld. In this guide we'll focus on ElevenLabs as the standard, but we'll mention where other tools complement it.
Common uses
- Narration — YouTube videos, courses, ads, podcasts
- Audiobooks — converting whole books to a consistent, pleasant voice
- IVR and phone answering — system messages, voice menus, automatic answering
- Characters — voices for games, animations and avatars
- Support agents — voice bots that hold a real conversation with customers
The three ways to work with ElevenLabs
Text-to-Speech — the core
Text-to-Speech is the foundation of ElevenLabs: you give text, and get an audio file in the voice you chose. But between "raw text" and "a voice that sounds perfect" there are a few decisions that completely change the result. The standard workflow: choose a voice → tune the sliders → choose a model → generate.
The Sliders — what each one does
- Stability — determines how "predictable" the voice is. A high value = a uniform, calm, more monotone voice. A low value = a more expressive, emotional voice, but also less predictable between runs. For long narration a medium-high value is good; for a dramatic character — low.
- Similarity / Similarity Boost — how closely the voice sticks to the source (especially relevant for a cloned voice). A high value reproduces the original speaker faithfully, but if the sample is noisy — it will reproduce the noise too.
- Style — boosts expressiveness and style. A high value adds "personality", but may weaken stability and increase latency. For voice agents 0 is preferable.
- Speaker Boost — strengthens the voice's resemblance to the speaker, at the cost of a little latency.
Choosing a model
| Model | Strength | When |
|---|---|---|
| Multilingual v2 | Maximum quality | Narration, audiobooks, high-quality multilingual |
| Turbo / Flash v2.5 | low latency (~75ms) | Voice Agents, real time, streaming |
| v3 (expressive) | Maximum expressiveness | Characters, emotion, dramatic dialogue |
Controlling pronunciation and pauses
ElevenLabs understands cues within the text itself. Punctuation affects intonation: a comma creates a short pause, a period creates a drop in tone, and a question mark raises the tone at the end. You can also add explicit pauses using SSML-style tags, for example <break time="1.0s" /> for a one-second silence. For words that are hard to pronounce you can use a Pronunciation Dictionary or write the word phonetically.
If the voice sounds too "flat" — lower Stability and raise Style. If it "jumps" between runs or sounds unstable — raise Stability. For long narration you want consistency (high Stability); for an ad or a character you want emotion (low Stability). Always generate 2–3 variations and choose.
Voices & Voice Library
Behind every audio creation is a voice — and every voice has a voice_id unique ID that identifies it in the API. ElevenLabs has three ways to get a voice: built-in voices, the community Voice Library, and designing a new voice from scratch.
Pre-made Voices — built-in voices
ElevenLabs provides a collection of built-in professional voices — men, women, different tones, different accents. These are the best starting point: they're high-quality, stable, and licensed for commercial use. Each carries a voice_id that you can copy and use directly in the API.
Voice Library — the community library
The Voice Library is a marketplace of voices that creators shared. Here you'll find a huge variety of voices in different styles — from a dramatic narrator to a young, energetic voice. You can filter by language, gender, age and style. Note: some voices are intended for certain uses only, so check each voice's terms of use before integrating it into a commercial product.
Voice Design — creating a voice from a description
The most powerful feature: Voice Design lets you create a completely new voice from a text description. You write something like "a young woman, warm and confident, with a professional tone" — and ElevenLabs generates several voice variations you can choose and save. This completely solves the rights and privacy problem: the voice doesn't belong to any real person.
How to choose a voice by use
- Narration / explainer — a stable, clear voice at a measured pace. Prefer high Stability.
- An ad — an energetic voice with personality. Higher Style.
- A character / game — a unique, expressive voice, perhaps from Voice Design.
- A voice agent / support — a pleasant, neutral, stable voice, with the Turbo model for low latency.
Voice Cloning
Voice cloning is the ability to take a real human voice and reproduce it so ElevenLabs can "read" any text in that voice. There are two types, fundamentally different in quality and requirements.
Practices for a quality sample
- Clean audio — no background noise, echo or music. Record in a quiet room with a good microphone.
- A consistent tone — keep the same speaking style throughout the sample. Don't mix a whisper with a shout.
- Uniform quality — don't combine recordings from different sources of different quality; the engine will learn the average.
- Sufficient length — for Professional, as much as possible (but clean). A noisy minute is worse than 30 clean seconds.
Only clone voices for which you have explicit permission to use — your own, or someone who gave documented consent. Cloning a person's voice without permission may constitute rights infringement, a privacy violation, and voice deepfaking. ElevenLabs requires ownership verification when cloning, and runs detection mechanisms. In many countries this is also a sensitive legal matter. Rule of thumb: if you're not sure you have permission — you don't.
Automatic dubbing and translation
Dubbing is one of ElevenLabs' impressive capabilities: you upload a video or audio in one language, and get it in another — while preserving the original speaker's voice and the timing. In other words, the same person now "speaks" English, Spanish or another language, in their very own voice.
The process combines several automatic steps: speech recognition (transcription), separating speakers (Speaker Diarization), translation, and creating new audio in a matching voice synced to the original timing. For content creators this is a powerful tool — you can take an explainer video in one language and distribute it in English to a global audience, or vice versa: localize foreign content.
A typical workflow
Automatic translation is excellent, but not free of errors — especially in idioms, slang and technical terms. Use the Dubbing Studio to review each segment, fix the translation, and tune the timing before export. Pay special attention to grammatical gender and directionality.
Real-time Voice Agents
Here ElevenLabs moves from a "creation tool" to "product infrastructure". Conversational AI (or Voice Agents) is a voice agent that holds a two-way conversation in real time — you speak, it understands, thinks, and replies in a natural voice, in under a second.
How a Voice Agent works — the loop
At its core, every voice agent is a loop of three components:
The real challenge isn't the components but turn management (Turn-taking): knowing when the user finished speaking, when to start answering, and above all — handlinginterruptions (Interruptions). If the user cuts off the agent mid-sentence, the agent needs to stop and listen. ElevenLabs Agents handles all of this behind the scenes.
Configuring an ElevenLabs Agent
- System Prompt — who the agent is, its role, how it speaks, and its boundaries
- Knowledge Base (RAG) — documents, FAQs and knowledge bases from which the agent pulls precise answers
- Tools / Function Calling — connecting the agent to an external API: checking inventory, booking an appointment, opening a ticket
- Telephony — connecting a real phone number so the agent answers incoming calls or dials out
- Voice & Language — choosing the voice and language and the TTS model
ElevenLabs Agents gives you a full, built-in stack — the fastest to start. Vapi and LiveKit Agents are more flexible orchestration layers: they let you mix providers (for example ElevenLabs TTS + another provider's STT + an LLM of your choice) and control telephony precisely. Rule of thumb: start with ElevenLabs Agents; move to Vapi/LiveKit when you need deeper control over the pipeline.
For depth on designing the agent itself — System Prompts, RAG and Tool Use — read the AI Agents guide. And for connecting the Backend and the automation behind the agent (CRM, emails, updating databases), the n8n guide is the perfect starting point.
The API in Python
ElevenLabs' official SDK turns TTS into a few lines of code. We'll start with installation and a basic example, then move to real-time streaming.
Installation and Authentication
# installation
pip install elevenlabs
# Environment variable (recommended — never write the key in code!)
export ELEVENLABS_API_KEY="your_api_key"
Basic TTS — generating audio
from elevenlabs.client import ElevenLabs
from elevenlabs import play
client = ElevenLabs(api_key="YOUR_API_KEY")
# text to speech
audio = client.text_to_speech.convert(
voice_id="JBFqnCBsd6RMkjVDRZzb",
model_id="eleven_multilingual_v2",
text="Hello, welcome to Automation4MI. How can I help?",
voice_settings={"stability": 0.5, "similarity_boost": 0.8, "style": 0.0},
)
play(audio)
The voice_id identifies the voice (copy it from the Voice Library or the built-in voices). Themodel_id chooses the engine — here eleven_multilingual_v2 for high multilingual quality. Thevoice_settings are exactly the sliders we saw: stability, similarity_boost and style.
Saving to a file instead of playback
from elevenlabs import save
audio = client.text_to_speech.convert(
voice_id="JBFqnCBsd6RMkjVDRZzb",
model_id="eleven_multilingual_v2",
text="This is a narration file saved to disk.",
)
save(audio, "narration.mp3") # save as MP3
Real-time streaming — low latency
# real-time streaming (low latency)
stream = client.text_to_speech.stream(
voice_id="JBFqnCBsd6RMkjVDRZzb",
model_id="eleven_turbo_v2_5",
text="This sentence is played as it's generated, without waiting for the full file.",
)
for chunk in stream:
# each chunk is audio bytes — play or save
pass
Never write the key directly in code or commit it to Git. Use an environment variable (ELEVENLABS_API_KEY) or a secrets manager. If a key leaks — rotate it immediately in the dashboard. On the client side (the browser) never expose a key — route the requests through your server.
eleven_turbo_v2_5 — for agents and anything that needs real time (low latency). eleven_multilingual_v2 — for narration, books and multilingual content where quality matters more than speed. Don't use Turbo for premium narration, and don't use Multilingual v2 in an agent where every millisecond counts.
5 practical projects
Below are 5 projects graded by difficulty — from simple narration to a full automated pipeline.
Natural narration for a video — from text to an MP3 ready to edit. The Multilingual v2 model for maximum quality.
from elevenlabs.client import ElevenLabs
from elevenlabs import save
client = ElevenLabs() # takes it from ELEVENLABS_API_KEY
script = """Welcome to the video.
Today we'll learn how to build automation with AI.
Let's begin."""
audio = client.text_to_speech.convert(
voice_id="JBFqnCBsd6RMkjVDRZzb",
model_id="eleven_multilingual_v2",
text=script,
voice_settings={"stability": 0.6, "similarity_boost": 0.8},
)
save(audio, "voiceover.mp3")
print("The narration was saved: voiceover.mp3")
Converting blog articles to an automatic audio version — each post becomes an MP3 to listen to.
from elevenlabs.client import ElevenLabs
from elevenlabs import save
import os
client = ElevenLabs()
def article_to_audio(title: str, body: str, slug: str):
text = f"{title}. {body}"
audio = client.text_to_speech.convert(
voice_id="JBFqnCBsd6RMkjVDRZzb",
model_id="eleven_multilingual_v2",
text=text,
voice_settings={"stability": 0.65, "similarity_boost": 0.75},
)
path = f"audio/{slug}.mp3"
os.makedirs("audio", exist_ok=True)
save(audio, path)
return path
# convert all the posts
posts = [
{"title": "What is automation", "body": "...", "slug": "what-is-automation"},
{"title": "AI Agents explained", "body": "...", "slug": "ai-agents"},
]
for p in posts:
print("Created:", article_to_audio(p["title"], p["body"], p["slug"]))
Automatic dubbing of a video to another language while preserving the speaker's voice — via the Dubbing API.
from elevenlabs.client import ElevenLabs
client = ElevenLabs()
# create a dubbing project from a video file
with open("source_video.mp4", "rb") as f:
dub = client.dubbing.create(
file=f,
target_lang="en", # from source to English (or another for the reverse)
source_lang="he",
num_speakers=1,
)
dubbing_id = dub.dubbing_id
print("Dubbing project created:", dubbing_id)
# wait for processing to finish, then download the result
# (in production: poll the status until it's 'dubbed', then:)
result = client.dubbing.get_dubbed_file(dubbing_id, language_code="en")
with open("dubbed_en.mp4", "wb") as out:
for chunk in result:
out.write(chunk)
print("Dubbing complete: dubbed_en.mp4")
A full Voice Agent — System Prompt, Knowledge Base (RAG) and a phone connection. The agent answers calls, answers FAQs, and opens tickets.
from elevenlabs.client import ElevenLabs
client = ElevenLabs()
# create a Voice Agent (Conversational AI)
agent = client.conversational_ai.agents.create(
name="Automation4MI Service Rep",
conversation_config={
"agent": {
"prompt": {
"prompt": (
"You are a warm, professional service rep for Automation4MI. "
"Answer briefly and courteously. If you don't know, "
"offer to transfer to a human rep. Don't make up information."
),
},
"language": "he",
},
"tts": {
"voice_id": "JBFqnCBsd6RMkjVDRZzb",
"model_id": "eleven_turbo_v2_5", # low latency for real time
},
},
)
print("Agent ID:", agent.agent_id)
# additional steps in the dashboard:
# 1. upload FAQ documents to the Knowledge Base (RAG)
# 2. define Tools (opening a ticket, checking an order)
# 3. connect a phone number (Telephony) for incoming calls
n8n listens for a webhook, sends text to the ElevenLabs API, and publishes the audio automatically. You can batch dozens of items at once.
# Webhook handler — triggered from n8n on every new content item
from elevenlabs.client import ElevenLabs
from elevenlabs import save
client = ElevenLabs()
def handle_webhook(payload: dict):
"""payload comes from n8n: {id, text, lang}"""
audio = client.text_to_speech.convert(
voice_id="JBFqnCBsd6RMkjVDRZzb",
model_id="eleven_multilingual_v2",
text=payload["text"],
)
path = f"out/{payload['id']}.mp3"
save(audio, path)
return {"status": "done", "file": path}
# batch — batch processing of items
def process_batch(items: list[dict]):
return [handle_webhook(item) for item in items]
# the full flow in n8n:
# Trigger (new RSS/DB) -> HTTP Request to this server
# -> ElevenLabs TTS -> Upload (S3/Drive)
# -> Publishing (YouTube/podcast/website)
To set up the flow in n8n itself — webhook, batching and error handling — see the n8n guide.
Cheat sheet — ElevenLabs
Choosing a model
| model_id | Strength | When |
|---|---|---|
| eleven_turbo_v2_5 | low latency | Agents, real time |
| eleven_multilingual_v2 | high quality | narration, multilingual, audiobooks |
| eleven_v3 | expressiveness | characters, emotion, dialogue |
Voice settings — when to tune
Tips for pronunciation
- Use
eleven_multilingual_v2orv3for non-English — not the English-only models - Correct punctuation = correct intonation. Add commas and periods at the natural breathing points
- For foreign words — try writing them phonetically if the pronunciation comes out wrong
- Add explicit pauses with
<break time="0.7s" />between long sentences - Always generate 2–3 variations and choose the most natural
Voice cloning types
Latency by use
| Use | Priority | Recommended model |
|---|---|---|
| Voice Agent / phone | low latency | Turbo / Flash |
| Narration / Audiobook | Quality | Multilingual v2 |
| Character / emotion | expressiveness | v3 |
Ready to start?
Go to elevenlabs.io and try the Studio for free, or get an API key and start building with the examples from this guide. Want to build a full voice agent? Continue to the related guides.