Skip to main content

Voice Cover Endpoint

Overview

Voice cover endpoint allows you to create an audio from an existing audio with a model. Get all voice models HERE .

Request

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

Watch the Voice Cloning API Demo video to see it in action Postman.

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

Body Attributes

ParameterDescriptionValues
keyYour API Key used for request authorizationstring
init_audioURL (YouTube links supported) or valid .wav file base64 data whose audio you want to cloneMP3/WAV URL or base64 data
model_idID of the voice cloning model. Get the model ID from the provided source.string
pitchControls the pitch transformation between voices.One of ["m2f", "f2m", "none"]
algorithmVoice cloning algorithm to use. Defaults to rmvpe.One of ["rmvpe", "mangio-crepe"]
rateRate of control for generated voice leakage. Higher values bias model towards training data.Floating point, between 0 and 1
seedSeed used to reproduce results. Pass null for a random number.integral value
languageLanguage of the voice. Supported languages include english, arabic, brazilian portuguese, chinese, dutch, french, hindi, hungarian, italian, japanese, korean, polish, russian, turkish. Default is english.string
emotionEmotion of the voice. Defaults to neutral.One of ["neutral", "happy", "sad", "angry", "dull"]
speedSpeed of the speaker. Defaults to 1.0.Floating point
radiusMedian filtering length to reduce voice artifacts. Defaults to 3.Floating point, between 0 and 3
mixControls loudness similarity to the original. Defaults to 0.25.Floating point, between 0 and 1
hop_lengthPitch analysis frequency. Used with mangio-crepe algorithm.Integral value
originalityControls similarity to original vocals' voiceless constants. Defaults to 0.33.Floating point, between 0 and 1
lead_voice_volume_deltaControls lead vocals volume adjustment.Integer, between -5 and +5
backup_voice_volume_deltaControls backup vocals volume adjustment.Integer, between -5 and +5
instrument_volume_deltaControls instrumental volume adjustment.Integer, between -5 and +5
reverb_sizeSize of reverb room. Defaults to 0.15.Floating point, between 0 and 1
wetnessReverb for generated vocals. Defaults to 0.2.Floating point, between 0 and 1
drynessReverb for original vocals. Defaults to 0.8.Floating point, between 0 and 1
dampingDamping factor for high frequencies in reverb. Defaults to 0.7.Floating point, between 0 and 1
base64Indicates if the input sound clip is in base64 format. Defaults to false.TRUE or FALSE
tempIndicates if you want the output to be auto-deleted from the server. Defaults to false.TRUE or FALSE
webhookURL to receive a POST API call once the audio generation is complete.URL
track_idID returned in the response for the webhook API call, used to identify the request.Integral value

Example

Body

Body
{   
"key": "",
"init_audio": "https://music.youtube.com/watch?v=aZ1hziFhj1o",
"model_id": "zoro",
"pitch": "none",
"rate": 0.5,
"radius": 3,
"mix": 0.25,
"algorithm": "rmvpe",
"hop_length": 128,
"originality": 0.5,
"lead_voice_volume_delta": "+1",
"backup_voice_volume_delta": "-2",
"instrument_volume_delta":"+2",
"reverb_size": 0.15,
"wetness": 0.2,
"dryness": 0.8,
"damping": 0.7,
"base64": false,
"temp": false,
"webhook": null,
"track_id" : null
}

Request

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

var raw = JSON.stringify({
"key": "",
"init_audio": "https://music.youtube.com/watch?v=aZ1hziFhj1o",
"model_id": "zoro",
"pitch": "none",
"rate": 0.5,
"radius": 3,
"mix": 0.25,
"algorithm": "rmvpe",
"hop_length": 128,
"originality": 0.5,
"lead_voice_volume_delta": "+1",
"backup_voice_volume_delta": "-2",
"instrument_volume_delta":"+2",
"reverb_size": 0.15,
"wetness": 0.2,
"dryness": 0.8,
"damping": 0.7,
"base64": false,
"temp": false,
"webhook": null,
"track_id" : null
});

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

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

Response

{
"generationTime": 1.5732920169830322,
"id": 10,
"links": [
"https://cdn2.stablediffusionapi.com/generations/bc1e5025-b140-4af6-be24-183fa18c943a.wav"
],
"proxy_links": [
"https://cdn2.stablediffusionapi.com/generations/bc1e5025-b140-4af6-be24-183fa18c943a.wav"
],
"meta": {
"algorithm": "rmvpe",
"backup_voice_volume_delta": -2,
"base64": "no",
"damping": 0.7,
"dryness": 0.8,
"filename": "bc1e5025-b140-4af6-be24-183fa18c943a.wav",
"hop_length": 128,
"input_sound_clip": "https://music.youtube.com/watch?v=aZ1hziFhj1o",
"instrument_volume_delta": 2,
"is_youtube": true,
"lead_voice_volume_delta": 1,
"mix": 0.25,
"model_id": "zoro",
"originality": 0.5,
"pitch": "none",
"radius": 3,
"rate": 0.5,
"reverb_size": 0.15,
"seed": 1216247535,
"temp": "no",
"wetness": 0.2
},
"status": "success",
}