Elevenlabs Text-to-Speech API with n8n Webhook
detail.loadingPreview
Generate speech from text using Elevenlabs.io via a custom n8n webhook. This workflow solves the need for programmatic text-to-speech generation by leveraging the 'Webhook', 'If params correct', and 'Generate voice' nodes.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow creates a custom API endpoint that allows you to generate text-to-speech audio using Elevenlabs.io. It's designed to be triggered by an incoming webhook POST request. The workflow first checks if the necessary parameters (voice_id and text) are present in the request. If they are, it proceeds to call the Elevenlabs API to generate the speech and then responds with the binary audio data. If the parameters are missing, it returns an error. This is particularly useful for integrating text-to-speech capabilities into other applications or automating content creation pipelines.
Key Features
- Custom webhook for receiving text-to-speech requests.
- Parameter validation for
voice_idandtext. - Integration with Elevenlabs.io API for high-quality speech generation.
- Responds with binary audio data or an error message.
How To Use
- Configure n8n Credentials: Set up a custom HTTP authentication credential in n8n, providing your Elevenlabs API key in the
xi-api-keyheader. - Deploy the Workflow: Activate and deploy this n8n workflow.
- Trigger the Webhook: Send a POST request to the deployed webhook URL. Include a JSON body with
voice_id(e.g.,21m00Tcm4Tlv240X2039) andtext(the content you want to convert to speech). Example body:{"voice_id": "21m00Tcm4Tlv240X2039", "text": "Hello, this is a test."} - Receive Audio: The response will be the binary audio data of the generated speech.
Apps Used
Workflow JSON
{
"id": "fb666d75-3244-4d67-b77a-7f0f8c748cc3",
"name": "Elevenlabs Text-to-Speech API with n8n Webhook",
"nodes": 0,
"category": "AI & Machine Learning",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: fb666d75-3244...
About the Author
N8N_Community_Pick
Curator
Hand-picked high quality workflows from the global community.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
Visa Requirement Checker
A workflow to check visa requirements based on user input, leveraging Langchain, Cohere embeddings, Weaviate vector store, and Anthropic LLM.
NeurochainAI Basic API Integration for Telegram
Integrates NeurochainAI's text and image generation APIs with a Telegram bot.
OpenAI Text-to-Speech Workflow
Generate audio from text using OpenAI's TTS API.