Voice Clone

POSThttps://api.newportai.com/api/async/voice_clone

The Voice Clone API allows developers to replicate the unique vocal characteristics of a target speaker. Once a voice is cloned, it can be used in conjunction with the Do TTS Clone API to generate natural-sounding speech from any provided text.

  • Submit a POST request to the Voice Clone API to obtain a taskId.
  • Submit a POST request to the Polling API to retrieve the cloning results.
  • Configure a Callback URL to receive results automatically on completion.

Request Headers

Content-Type string Required

Enum: application/json

Authorization string Required

Bearer authentication token. Example: Bearer {{APIKey}}.

Request Body

voiceUrl string Required

The URL of the source audio file containing the voice to be cloned. The file must be publicly accessible.

Response

code integer

Returns 0 for success, or a specific error code.

message string

Returns "success" or a descriptive error message.

data object
taskId string

The unique identifier for the task. Use this ID with the Polling API to retrieve the generated output.

Errors

10192Illegal param

Polling

Use the Polling API to retrieve the processing results.

Callback

Alternatively, you can enable Callback to receive task results automatically upon completion.

0Task Completed
{
    "code": 0,
    "message": "success",
    "data": {
        "task": {
            "taskId": "9b9a22dd3e8f461e8049eff9f6de5b20",
            "status": 3,
            "executionTime": 3697,
            "expire": 1740648465317,
            "taskType": "voice_clone"
        },
        "cloneId": "fe82a0faf1444f93bd7f49a4ba745b63"
    }
}
Request
cURL
curl -X POST 'https://api.newportai.com/api/async/voice_clone' \
  -H "Authorization: Bearer {{key}}" \
  -H 'Content-Type: application/json' \
  -d '{
    "voiceUrl": "https://d2t5pyzt5qvy2d.cloudfront.net/api/static_resource/prod/default/AoOVLxqINsl1dTAAhnmAW.wav"
}'
0Successful
{
    "code": 0,
    "message": "success",
    "data": {
        "taskId": "9b9a22dd3e8f461e8049eff9f6de5b20"
    }
}