ElevenLabs
ElevenLabs is a component that turns written words into spoken audio. It uses the Eleven Labs API to generate realistic voices from your text, making it easy to add audio narration or alerts to your automation workflows.
How it Works
When you provide the text you want spoken, the component sends that text to the Eleven Labs service along with your chosen voice and model. Eleven Labs processes the request and returns the audio data encoded in Base64. The component then outputs this audio data so you can play it, store it, or send it to another part of your workflow.
Inputs
- Custom Voice ID: Optional custom voice ID. If provided, this will be used instead of the selected voice.
- Model: The model to use for speech synthesis.
- Text: Text to convert to speech. Can be plain text or a Message object.
- Voice: The voice to use for speech synthesis.
Credential
This component requires an Eleven Labs API credential.
- First, add a credential of type Eleven Labs API in the Nappai credentials section.
- Then select that credential in the component’s Credential field.
The credential contains your Eleven Labs API Key, which is kept secure by Nappai and never exposed in the workflow.
Outputs
- Audio Base64: A Message containing the audio data encoded in Base64. The method used is
generate_speech_base64
. This output can be passed to other components that play audio, save files, or send messages.
Usage Example
- Drag the ElevenLabs component onto your dashboard.
- In the Credential field, choose the Eleven Labs API credential you created.
- Enter the text you want spoken in the Text field.
- Pick a Voice from the dropdown (e.g., “Joanna”).
- Select a Model (e.g., “eleven_multilingual_v1”).
- (Optional) If you have a custom voice ID, paste it into Custom Voice ID.
- Run the workflow.
- The component outputs Audio Base64; connect this to a “Play Audio” component or save it to a file.
Related Components
- Google Text‑to‑Speech – Convert text to speech using Google’s TTS service.
- Amazon Polly – Generate speech with Amazon’s realistic voices.
- Azure Speech Service – Microsoft’s TTS solution for Azure users.
Tips and Best Practices
- Keep your Eleven Labs API key secure by storing it in Nappai’s credential manager.
- Use short text snippets for faster response times; long passages may take longer to generate.
- Test different voices and models to find the best fit for your audience.
- If you need to play the audio immediately, connect the output to a “Play Audio” component right after the ElevenLabs component.
Security Considerations
- The API key is stored securely in Nappai’s credential store and is never exposed in the workflow or logs.
- Ensure that only authorized users have access to the credential to prevent unauthorized usage of your Eleven Labs account.