ElevenLabs Sound Effects - Quickstart Python Example
March 30, 2026 ยท View on GitHub
Generate a sound effect MP3 from a text prompt using the ElevenLabs Python SDK.
Setup
-
Copy the environment file and add your API key:
cp .env.example .envThen edit
.envand paste your ElevenLabs API key. -
Create a virtual environment and install dependencies:
python3 -m venv .venv .venv/bin/pip install -r requirements.txt
Run
.venv/bin/python main.py "Cinematic Braam, Horror"
The generated sound effect is saved to output.mp3.