Skip to main content

Vocal Isolator Endpoint

Overview

The endpoint separate the vocals from the background music of a video and audio file.

Request

--request POST 'https://modelslab.com/api/v6/voice/vocal_isolator' \

Make a POST request to https://modelslab.com/api/v6/voice/vocal_isolator endpoint and pass the required parameters as a request body.

Body Attributes

ParameterDescriptionValues
keyThe API key used for authenticating your request.String
init_videoThe video you want to isolate the vocals from.URL
init_audioThe audio you want to isolate the vocal fromURL
base64Indicates whether the input audio file is provided in base64 format. Defaults to false.TRUE or FALSE
seedRandom seed for reproducibility (if 0, a random seed is generated)Int (random number )
webhookA URL where the API will send a POST request once the audio generation is complete.URL
track_idAn ID returned in the API response, used to identify webhook requestsIntegral value

Either init_video or init_audio is required. If both are provided, the init_video takes precedence.

Open in Playground 🚀

Example

Body

Body
{   
"key": "",
"init_video": "https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/livewire-tmp/IxEA4uB8vGWAk1BQVvqbciebfgGFMK-metadmlkZW9wbGF5YmFja180Lm1wNA==-.mp4",
"seed":234322,
"base64": false
"webhook": null,
"track_id": null
}

Request

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
"key": "",
"init_video": "https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/livewire-tmp/IxEA4uB8vGWAk1BQVvqbciebfgGFMK-metadmlkZW9wbGF5YmFja180Lm1wNA==-.mp4",
"output_format":"mp3",
"seed":234322,
"base64": false
"webhook": null,
"track_id": null
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://modelslab.com/api/v6/voice/vocal_isolator", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Response

{
"status": "success",
"generationTime": 1.904285192489624,
"id": 334166,
"output": [
"https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/a3f8a04c-26c1-485c-b3b5-5c6244a0d395.wav"
],
"proxy_links": [
"https://cdn2.stablediffusionapi.com/generations/a3f8a04c-26c1-485c-b3b5-5c6244a0d395.wav"
],
"meta": {
"input_audio": "tmp/rock_en.wav",
"file_type": "wav",
"device": "cuda",
"webhook": null,
"id": null,
"filename": "a3f8a04c-26c1-485c-b3b5-5c6244a0d395",
"temp": "no",
"base64": "no"
}
}