Documentation Index
Fetch the complete documentation index at: https://docs.camb.ai/llms.txt
Use this file to discover all available pages before exploring further.
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
Create an account
Sign up at CAMB.AI Studio if you haven’t already.
Get your API key
Go to Settings → API Keys in Studio and copy your key. See Authentication for details.
Install the SDK
Code
How it works
Separation runs as an async pipeline:Parameters
Required
| Parameter | Type | Description |
|---|---|---|
media_file | file stream | Mixed audio to separate (uploaded as multipart form data) |
Optional
| Parameter | Type | Description |
|---|---|---|
project_name | string | Label for the job in your dashboard |
project_description | string | Notes for the job |
folder_id | integer | Folder to organize the run under |
run_id | integer | Optional run identifier for tracing |
traceparent | string | Distributed tracing header value |
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.