Tutorial · Python · ~10 min
Remove Background Music from Voice Recording
Podcasters and voiceover artists: keep the take, drop the track. One call separates clean speech from background music.
Why this matters
Re-recording a voiceover because a music bed leaked in costs time and sounds different. Source separation recovers the original vocal take instead.
Trained separation models isolate the speech stem while preserving prosody — the result is the voice, minus the bed, not an EQ'd mush.
How it works
Submit the recording with stems=[vocals]. The API returns the isolated speech track plus the music stem, both in WAV/FLAC.
Submit a job with an input URL (S3, GCS or HTTPS), poll the job URL, and download the rendered output. No GPU, no queues, no ffmpeg builds to babysit.
Code
import requests, time
API = "https://api.mlslabs.io/v1/vocal-separator/jobs"
headers = {"X-API-Key": "YOUR_API_KEY"}
payload = {"input": "s3://bucket/voiceover.wav", "stems": ["vocals"]}
resp = requests.post(API, json=payload, headers=headers)
job = resp.json()
while job["status"] not in ("succeeded", "failed"):
time.sleep(3)
job = requests.get(job["url"], headers=headers).json()
print("Output:", job["output_url"])Pro tips
- Separate before any heavy compression — less aggressive processing upstream means cleaner stems.
- Use the vocals stem in your podcast editor; keep the music stem for re-mixing.
- For meeting recordings, pair with denoise for the cleanest transcript.
Pricing note
Usage is metered per minute of media processed; the first tier is free each month. Volume discounts kick in automatically.
FAQ
Common questions
Will it work with music that has lyrics?
Separation splits lyrics into the vocal stem — that is the point. The vocal stem then contains speech plus any sung voice.
What formats are supported?
WAV, MP3, FLAC, M4A input; WAV or FLAC output.
Does it handle long recordings?
Yes — hours-long files are processed in chunks and stitched.