> ## Documentation Index
> Fetch the complete documentation index at: https://help.emergent.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# ElevenLabs Integration

> Turn text into realistic speech with AI

## What is ElevenLabs?

ElevenLabs creates incredibly realistic AI voices. You can turn any text into natural-sounding speech - perfect for audiobooks, accessibility, voice assistants, and more.

**Perfect for:**

* Text-to-speech for accessibility
* Audiobook creation
* Voice assistants
* Content narration
* Podcast generation

## What You'll Need

<Steps>
  <Step title="ElevenLabs Account">
    Sign up at [elevenlabs.io](https://elevenlabs.io)
  </Step>

  <Step title="Choose Voice">
    Pick from their voice library
  </Step>

  <Step title="API Key">
    Get your API key
  </Step>

  <Step title="5 Minutes">
    Quick setup!
  </Step>
</Steps>

## Step 1: Get Your ElevenLabs API Key

### Create Account

1. Go to [elevenlabs.io](https://elevenlabs.io)
2. Click **Sign Up**
3. Verify your email

**Free Plan:**

* 10,000 characters per month
* All voices available
* Good for testing!

**Paid Plans:**

* Starter: \$5/month (30,000 characters)
* Creator: \$22/month (100,000 characters)
* Pro: \$99/month (500,000 characters)

### Get Your API Key

1. Click your **Profile** icon (top right)
2. Select **Profile + API Key**
3. Copy your API key

### Choose a Voice

1. Go to **Voices** in the dashboard
2. Listen to different voices
3. Click on one you like
4. Copy the **Voice ID**

**Popular Voices:**

* **Rachel** - Calm, friendly female voice
* **Adam** - Deep, authoritative male voice
* **Bella** - Soft, expressive female voice
* **Josh** - Professional, clear male voice

## Step 2: Tell the Agent What You Want

Describe what you're building:

### Example 1: Article Reader

```
I want to convert blog posts to audio.

ElevenLabs API key: [paste your key]
Voice: Rachel (or Voice ID: xyz)

Features:
- "Listen" button on each article
- Generates audio from the text
- Audio player to listen
- Download audio option

Please set this up.
```

### Example 2: Audiobook Generator

```
I need to create audiobooks from text.

ElevenLabs API key: [paste your key]
Voice: Adam

Features:
- Upload a text file or paste text
- Convert entire book to audio
- Chapter-by-chapter playback
- Download as MP3

Please build this.
```

### Example 3: Voice Assistant

```
I want an AI that speaks responses.

ElevenLabs API key: [paste your key]
Voice: Bella

Flow:
1. User types a question
2. AI generates text response
3. Convert response to speech
4. Play audio automatically

Please set this up.
```

<Tip>
  **That's it!** The agent will handle all the voice generation setup.
</Tip>

## Step 3: Test Your Voice

After setup:

<Steps>
  <Step title="Click Preview">
    In Emergent, click **Preview**
  </Step>

  <Step title="Enter Text">
    Type or paste some text
  </Step>

  <Step title="Generate Speech">
    Click the generate/convert button
  </Step>

  <Step title="Listen">
    Should hear realistic AI voice!
  </Step>

  <Step title="Try Different Text">
    Test with various content
  </Step>

  <Step title="Check Quality">
    Make sure it sounds natural
  </Step>
</Steps>

## Common Questions

<AccordionGroup>
  <Accordion title="How much does it cost?">
    Based on characters converted:

    **Free:** 10,000 characters/month

    * About 1,500 words
    * Great for testing

    **Paid:** Starting at \$5/month for 30,000 characters

    1,000 words = roughly 6,700 characters
  </Accordion>

  <Accordion title="Can users choose different voices?">
    Yes! Tell the agent:

    ```
    Let users pick from multiple voices:
    - Rachel (female, friendly)
    - Adam (male, professional)
    - Bella (female, warm)

    Add a voice selector dropdown.
    ```
  </Accordion>

  <Accordion title="Speech sounds robotic. Can you make it better?">
    ElevenLabs is already very natural, but you can tell the agent:

    ```
    The voice sounds a bit flat. Can you:
    1. Use a more expressive voice
    2. Adjust speech settings for more emotion
    3. Add pauses at punctuation
    ```
  </Accordion>

  <Accordion title="Can I create a custom voice?">
    Yes, with voice cloning! Tell the agent:

    ```
    I want to clone a specific voice.
    Users will upload audio samples.
    Generate speech using that cloned voice.

    Please add voice cloning feature.
    ```

    (Requires paid ElevenLabs plan)
  </Accordion>
</AccordionGroup>

## Something Not Working?

### Audio Not Generating

**Tell the agent:**

```
When I click generate, nothing happens.
Can you check the ElevenLabs connection?
```

### Poor Audio Quality

**Tell the agent:**

```
The audio quality is poor or choppy.
Can you:
1. Use higher quality settings
2. Check the audio encoding
```

### Generation Too Slow

**Tell the agent:**

```
It takes too long to generate speech.

Can you:
1. Add a loading indicator
2. Show progress
3. Optimize the generation process
```

### Hitting Character Limits

**Tell the agent:**

```
I'm running out of characters.

Can you:
1. Show how many characters used
2. Warn when close to limit
3. Split long text into chunks
```

## Real Examples

### Example 1: Learning Platform

```
I'm building an e-learning platform.

Features:
- Convert lesson text to audio
- Students can listen while reading
- Downloadable lesson audio
- Multiple voice options

ElevenLabs API key: [paste key]

Please build this.
```

### Example 2: News Reader

```
Create an audio news reader.

Features:
- Fetch daily news articles
- Convert to audio automatically
- Play in podcast-style player
- Generate new episodes daily

ElevenLabs API key: [paste key]
Voice: Professional male voice

Please set this up.
```

### Example 3: Accessibility Tool

```
Make my website accessible with audio.

Features:
- "Listen" button on all pages
- Reads page content aloud
- Adjustable speed
- Pause/resume controls

ElevenLabs API key: [paste key]

Please build this.
```

## Advanced Features

Once basic speech works:

### Multiple Languages

```
Add support for multiple languages:
- English
- Spanish  
- French
- German

Auto-detect language and use appropriate voice.
```

### Emotion Control

```
Add emotion options:
- Happy/Excited
- Calm/Professional
- Serious/Formal

Let users choose the tone.
```

### Speech Customization

```
Let users adjust:
- Speech speed (0.5x to 2x)
- Voice pitch
- Emphasis on certain words
```

## Quick Checklist

Before going live:

* Tested with short text
* Tested with long text
* Audio quality is good
* Tried different voices
* Works on mobile
* Download option works (if needed)
* Monitored character usage

## Remember

**Free tier for testing** - 10,000 characters/month

**Very natural voices** - ElevenLabs has the best quality

**Monitor usage** - Check your character count

**Test with real content** - Try actual articles/text

<Info>
  Stuck? Tell the agent: "I need help with ElevenLabs voice generation" and describe the issue.
</Info>
