Overview
Separate a mixed recording into two stems: foreground (vocals, speech, or lead elements) and background (accompaniment, ambience, or supporting sounds). This is useful for remixing, isolation, accessibility, and cleaning up recordings. The pipeline is asynchronous: you upload an audio file, poll until processing finishes, then download URLs for both stems.Prerequisites
1
Create an account
Sign up at CAMB.AI Studio if you havenโt already.
2
Get your API key
Go to Settings โ API Keys in Studio and copy your key. See Authentication for details.
3
Install the SDK
4
Set your API key to use in your code
Code
Parameters
Required
Optional
Tips
- Formats: FLAC, MP3, WAV, and AAC are supported; lossless or high-quality sources generally separate better than heavily compressed files.
- Length: Roughly 10 seconds to 10 minutes often works well; very long files may take more processing time.
- Polling: Cap your loop (for example 60 attempts ร 5 seconds) and treat timeout as a separate failure path from
ERROR. - Mix balance: Foreground and background should both be audible in the original mix for cleaner stems.
Next Steps
Create Audio Separation
Multipart upload and task creation API reference.
Get Separation Status
Poll task status with
task_id.Get Separation Result
Retrieve
foreground_audio_url and background_audio_url.Dubbing
Translate video audio with the SDK.