POST
/
voice
/
voice_upload
Upload voice for training
curl --request POST \
  --url https://modelslab.com/api/v6/voice/voice_upload \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "name": "<string>",
  "init_audio": "<string>",
  "base64": false,
  "language": "english",
  "gender": "male",
  "thumbnail": "<string>"
}'
{
  "status": "success",
  "message": "<string>",
  "voice_id": "<string>"
}

Request

Make a POST request to below endpoint and pass the required parameters as a request body.
curl
--request POST 'https://modelslab.com/api/v6/voice/voice_upload' \

Body

json
{       
    "key":"",    
    "name":"Jacob",    
    "init_audio":"https://pub-f3505056e06f40d6990886c8e14102b2.r2.dev/audio/jacob.wav",    
    "language":"english"
}

Body

application/json
key
string
required

API key to authorize the request

name
string
required

Display name assigned to the voice being uploaded

init_audio
string<uri>
required

URL of audio file to upload. MP3/WAV, 10-25 seconds for optimal results

language
enum<string>
required

Language of the voice

Available options:
english,
arabic,
spanish,
german,
czech,
brazilian portuguese,
chinese,
dutch,
french,
hindi,
hungarian,
italian,
japanese,
korean,
polish,
russian,
turkish
base64
boolean
default:false

Whether audio file is provided as base64 string

gender
enum<string>

Gender of the audio

Available options:
male,
female
thumbnail
string<uri>

Thumbnail image URL for the audio

Response

Voice upload response

status
enum<string>

Status of the voice upload

Available options:
success,
error
message
string

Response message

voice_id
string

Generated voice ID for the uploaded voice