Terminal
Terminal/Skill
Removes background noise and isolates speech or vocals from audio recordings with the ElevenLabs Voice Isolator API.
By ElevenLabs
Works with
npx skills add elevenlabs/skills --skill voice-isolatorRemoves background noise from audio and isolates vocals/speech — useful for cleaning up noisy recordings, prepping audio for transcription, or pulling dialogue out of a mixed track.
Setup: See Installation Guide. For JavaScript, use
@elevenlabs/*packages only.
from elevenlabs import ElevenLabs
client = ElevenLabs()
with open("noisy.mp3", "rb") as audio_file:
audio_stream = client.audio_isolation.convert(audio=audio_file)
with open("clean.mp3", "wb") as f:
for chunk in audio_stream:
f.write(chunk)
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
import { createReadStream, createWriteStream } from "fs";
const client = new ElevenLabsClient();
const audioStream = await client.audioIsolation.convert({
audio: createReadStream("noisy.mp3"),
});
audioStream.pipe(createWriteStream("clean.mp3"));
elevenlabs audio-isolation convert --audio noisy.mp3 --output clean.mp3
| Parameter | Type | Default | Description |
|---|---|---|---|
audio | file (required) | — | Audio file with vocals/speech to isolate |
file_format | string | other | other for any encoded audio, or pcm_s16le_16 for 16-bit PCM mono @ 16kHz little-endian (lower latency) |
import requests
from io import BytesIO
from elevenlabs import ElevenLabs
client = ElevenLabs()
audio_url = "https://example.com/noisy.mp3"
response = requests.get(audio_url)
audio_data = BytesIO(response.content)
audio_stream = client.audio_isolation.convert(audio=audio_data)
with open("clean.mp3", "wb") as f:
for chunk in audio_stream:
f.write(chunk)
If you already have raw 16-bit PCM mono @ 16kHz, passing file_format="pcm_s16le_16" skips decoding and reduces latency:
audio_stream = client.audio_isolation.convert(
audio=pcm_bytes,
file_format="pcm_s16le_16",
)
Any common encoded audio/video container works as input (MP3, WAV, M4A, FLAC, OGG, WebM, MP4, etc.). Response is a streamed MP3 by default.
speech_to_text.convert() for better transcription accuracy.try:
audio_stream = client.audio_isolation.convert(audio=audio_file)
except Exception as e:
print(f"Voice isolation failed: {e}")
Common errors:
file_format for the supplied audio)