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.
List of Elevenlabs Components
Quickly compare Elevenlabs components by what they do and their key I/O.
Component | Action | What it Does | Inputs | Key Outputs | Use Case |
---|---|---|---|---|---|
Text to Speech | Generate | Converts a string of text into an audio file. | required text , voice_id optional settings | url | Generating voiceovers, accessibility features. |
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
- Log in to your Elevenlabs account.
- Click on your profile icon in the top-right corner.
- Select Profile + API Key.
- 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.
- In your SmythOS dashboard, navigate to the Vault.
- Create a new secret and paste your Elevenlabs API Key as the value. Give it a memorable name, like
elevenlabs_api_key
. - For more details, see the Vault Documentation.
Step 3: Configure the Elevenlabs Component
- In your SmythOS agent graph, drag and drop the Text to Speech component.
- Click the component to open its Settings panel.
- In the
API Key
field, select the secret you saved in the Vault (e.g.,elevenlabs_api_key
). - Configure other settings like
Model ID
as needed. - Your connection is now configured for that component.
Which Elevenlabs Component Should I Use?
If you need to… | Target | Use this Component | Why this one? |
---|---|---|---|
Convert any text into an audio file | A string of text | Text to Speech | This 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.
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
Field | Type | Required | Notes |
---|---|---|---|
text | string | Yes | The text you want to convert into speech. |
voice_id | string | Yes | The unique ID of the voice to use for generation. You can find voice IDs in your Elevenlabs VoiceLab. |
Outputs
Field | Type | Description |
---|---|---|
url | string | A temporary URL pointing to the generated audio file. |
Response | binary | The raw binary data of the generated MP3 audio file. |
Headers | object | The HTTP headers from the API response, containing details like content type and size. |
{
"component": "elevenlabs.textToSpeech",
"text": "Hello, world! This is an audio message generated automatically by a SmythOS agent.",
"voice_id": "21m00Tcm4TlvDq8ikWAM"
}
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_id
s and tweak theStability
andSimilarity 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.
- Cause: The
-
Audio Quality Issues
- Cause: The
Stability
andSimilarity 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.
- Cause: The
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.