Skip to main content

Elevenlabs Integration with SmythOS

Want to give your applications a voice? Connect Elevenlabs to SmythOS and empower your agents to convert any text into natural-sounding, high-quality audio in real time.

TL;DR

Securely link your Elevenlabs account to SmythOS using an API key. Then, use the "Text to Speech" component to automate the generation of audio from any text input, with fine-grained control over voice, style, and stability.

List of Elevenlabs Components

Quickly compare Elevenlabs components by what they do and their key I/O.

ComponentActionWhat it DoesInputsKey OutputsUse Case
Text to SpeechGenerateConverts a string of text into an audio file.required text, voice_id
optional settings
urlGenerating voiceovers, accessibility features.
INFO
Why Integrate Elevenlabs with Your Agent?

Elevenlabs provides state-of-the-art AI voice synthesis. By integrating it with SmythOS, you can build agents that communicate not just with text, but with high-quality, natural-sounding speech.

  • Automate Voiceovers: Create agents that take a script from a document or an AI's output and automatically generate a voiceover for videos, presentations, or podcasts.
  • Enhance Accessibility: Build workflows that convert written content, like blog posts or reports, into audio format, making your content accessible to a wider audience.
  • Create Dynamic Audio Alerts: Move beyond text-based notifications. Have your agents generate spoken alerts for critical system events, new leads, or important updates.
  • Personalized Audio Content: Generate personalized audio messages at scale. An agent could create custom audio greetings, summaries, or reminders for each user in a list.

Prerequisites

Before you begin, please ensure you have the following:

  • An active SmythOS account. (Sign up here).
  • An Elevenlabs account.
  • Your Elevenlabs API Key.

Getting Started With Elevenlabs

The connection between SmythOS and Elevenlabs is configured using a secure API key.

Step 1: Get Your Elevenlabs API Key

  1. Log in to your Elevenlabs account.
  2. Click on your profile icon in the top-right corner.
  3. Select Profile + API Key.
  4. Your API Key will be displayed. Copy it to your clipboard.

Step 2: Store Your API Key in SmythOS Vault

Your API Key is a sensitive credential. Use the SmythOS Vault to store it securely.

  1. In your SmythOS dashboard, navigate to the Vault.
  2. Create a new secret and paste your Elevenlabs API Key as the value. Give it a memorable name, like elevenlabs_api_key.
  3. For more details, see the Vault Documentation.

Step 3: Configure the Elevenlabs Component

  1. In your SmythOS agent graph, drag and drop the Text to Speech component.
  2. Click the component to open its Settings panel.
  3. In the API Key field, select the secret you saved in the Vault (e.g., elevenlabs_api_key).
  4. Configure other settings like Model ID as needed.
  5. Your connection is now configured for that component.
Heads-up
You must add the API Key from the Vault to each Elevenlabs component you use. This ensures all connections are secure and properly authenticated.

Which Elevenlabs Component Should I Use?

If you need to…TargetUse this ComponentWhy this one?
Convert any text into an audio fileA string of textText to SpeechThis is the core component for all voice synthesis tasks with Elevenlabs.

Component Details

This section provides detailed information for the Elevenlabs component.

Text to Speech

Converts a string of text into a high-quality audio file using a selected voice.

INFO
This component requires an API Key for authentication, as detailed in the Getting Started section.

Component-Specific Settings

In the component's settings panel, you can fine-tune the audio output:

  • Model ID: Select the speech synthesis model to use. Different models offer various languages and voice characteristics.
  • Similarity Boost: A slider to control how closely the output voice matches the selected voice model. Higher values increase similarity but may affect naturalness.
  • Stability: A slider to control the consistency of the voice. Higher values produce a more monotonic, steady voice, while lower values allow for more expression.
  • Style: A slider to exaggerate the selected voice's speaking style.

Inputs

FieldTypeRequiredNotes
textstringYesThe text you want to convert into speech.
voice_idstringYesThe unique ID of the voice to use for generation. You can find voice IDs in your Elevenlabs VoiceLab.

Outputs

FieldTypeDescription
urlstringA temporary URL pointing to the generated audio file.
ResponsebinaryThe raw binary data of the generated MP3 audio file.
HeadersobjectThe HTTP headers from the API response, containing details like content type and size.
Use Case

Create a "read it for me" agent. The agent scrapes the text content of a blog post, passes it to the text input of this component, and returns the audio url so the user can listen to the article.

{
"component": "elevenlabs.textToSpeech",
"text": "Hello, world! This is an audio message generated automatically by a SmythOS agent.",
"voice_id": "21m00Tcm4TlvDq8ikWAM"
}
Character Limits & Costs

Your Elevenlabs plan will have a character quota. Long text inputs will consume more of your monthly quota. Be mindful of this when processing large documents.

Best Practices & Advanced Tips

  • Secure Your API Key: Always use the SmythOS Vault to store your Elevenlabs API key.
  • Experiment with Voices and Settings: The best way to get the perfect audio output is to test different voice_ids and tweak the Stability and Similarity Boost settings. What works for a news report might not work for a friendly notification.
  • Chunk Large Texts: For very long documents, consider splitting the text into smaller chunks (e.g., paragraphs) and generating audio for each one. This can prevent timeouts and provide more control over the final audio composition.
  • Manage Your Quota: Keep an eye on your character usage in your Elevenlabs dashboard, especially if you are running agents that process large volumes of text.

Troubleshooting Common Issues

  • Error: 401 Unauthorized

    • Cause: The API key is missing, invalid, or disabled.
    • Solution: Verify that the API key in your SmythOS Vault is correct and matches the one in your Elevenlabs profile. Ensure your account is active.
  • Error: 402 Payment Required / Quota Exceeded

    • Cause: You have used up your monthly character quota.
    • Solution: Check your usage and quota in your Elevenlabs dashboard. You may need to wait for the next billing cycle or upgrade your plan.
  • Error: 400 Bad Request (e.g., "Voice not found")

    • Cause: The voice_id provided does not exist or your account does not have access to it.
    • Solution: Double-check the voice_id from your Elevenlabs VoiceLab. Ensure there are no typos.
  • Audio Quality Issues

    • Cause: The Stability and Similarity Boost settings might not be optimal for the chosen voice and text.
    • Solution: Adjust the sliders in the component settings. Try lowering similarity or increasing stability for a more consistent output, or vice-versa for more expression.

What's Next?

You're now ready to build engaging, voice-enabled workflows with the SmythOS Elevenlabs Integration!

Consider these ideas:

  • Build an Agent That...

    • Fetches top headlines from the NewsAPI Integration, and generates a daily audio news briefing.
    • Connects to your calendar, checks your schedule for the next day, and generates a personalized "good morning" audio summary of your appointments.
    • Monitors a customer support inbox, and when an urgent ticket arrives, generates a spoken alert that is played over an office speaker system.
  • Explore Other Integrations:

    • Combine Elevenlabs with AI text generation components. Have an AI write a summary of a long report, then have Elevenlabs read that summary aloud.
    • Use the ScrapingBee Integration to extract text from a website and pass it directly to the Text to Speech component.
    • Store the generated audio files in a cloud service like OneDrive for long-term access.