Generate sound effects from text descriptions using ElevenLabs. Use when creating sound effects, generating audio textures, producing ambient sounds, cinematic impacts, UI sounds, or any audio that isn't speech. Supports looping, duration control, and prompt influence tuning.
Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).ai-agentselevenlabsmusicsfxskillsstt
ElevenLabs Sound Effects
Generate sound effects from text descriptions — supports looping, custom duration, and prompt adherence control.
Setup: See Installation Guide. For JavaScript, use @elevenlabs/* packages only.
Quick Start
Python
from elevenlabs import ElevenLabs
client = ElevenLabs()
audio = client.text_to_sound_effects.convert(
text="Thunder rumbling in the distance with light rain",
)
with open("thunder.mp3", "wb") as f:
for chunk in audio:
f.write(chunk)
JavaScript
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
import { createWriteStream } from "fs";
const client = new ElevenLabsClient();
const audio = await client.textToSoundEffects.convert({
text: "Thunder rumbling in the distance with light rain",
});
audio.pipe(createWriteStream("thunder.mp3"));
cURL
curl -X POST "https://api.elevenlabs.io/v1/sound-generation" \
-H "xi-api-key: $ELEVENLABS_API_KEY" -H "Content-Type: application/json" \
-d '{"text": "Thunder rumbling in the distance with light rain"}' \
--output thunder.mp3
Parameters
Parameter
Type
Default
Description
text
string (required)
—
Description of the desired sound effect
model_id
string
eleven_text_to_sound_v2
Model to use
duration_seconds
number | null
null (auto)
Duration 0.5–30s; auto-calculated if null
prompt_influence
number | null
0.3
How closely to follow the prompt (0–1)
loop
boolean
false
Generate a seamlessly looping sound (v2 model only)