See llms.txt for all machine-readable content.

Back to Templates

Generate chat-based sound effects with OpenAI and ElevenLabs

Created by

Created by: Dr. Firas || drfiras
Dr. Firas

Last update

Last update a day ago

Categories

Share


Quick overview

This workflow turns an n8n chat message into a detailed sound-effect prompt using OpenAI, then generates an MP3 sound effect via the ElevenLabs Sound Generation API and replies in chat with the audio and the settings used.

How it works

  1. Receives a message in n8n Chat describing the sound effect the user wants.
  2. Uses OpenAI to rewrite the message into a single, literal ElevenLabs-ready sound prompt and to propose duration and prompt-influence settings as JSON.
  3. Parses the JSON response, falls back to the original user text if parsing fails, and clamps duration (0.5–30s) and prompt influence (0–1) to valid ranges.
  4. Calls the ElevenLabs sound-generation endpoint to create an MP3 file using the prompt and settings, retrying on failures.
  5. Replies in chat with the generated MP3 and a text summary of the prompt and settings, or returns a friendly error message if generation fails.

Setup

  1. Add an OpenAI API credential and select it for the OpenAI chat model used to generate the sound-effect prompt.
  2. Create an ElevenLabs API key header-auth credential (header name xi-api-key) and select it for the ElevenLabs HTTP request.
  3. Ensure n8n Chat is enabled in your n8n environment and test by sending a clear sound description (for example, “a heavy wooden door creaking open”).

Additional info

Generate sound effects from chat using OpenAI and ElevenLabs

📥 Open full documentation on Notion

Need help customizing?

Contact me for consulting and support : Linkedin

MY NEW YOUTUBE CHANNEL

👉 Subscribe to my new YouTube channel. Here I'll share videos and Shorts with practical tutorials and FREE templates for n8n.

The AI Doctor