Do TTS Clone

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

The Do TTS Clone API utilizes an existing cloned voice to synthesize new audio from provided text. A cloneId is required to perform this action; if you do not have one, you must first use the Voice Clone API to generate it.

Workflow Overview

  • Step 1: Obtain a cloneId
    • Submit a request via the Voice Clone API.
    • Retrieve the cloneId from the Polling API once the task is complete.
  • Step 2: Generate Audio
    • Submit a POST request to the Do TTS Clone API using the cloneId, target text, and language code.
    • Use the resulting taskId with the Polling API to retrieve the final audioUrl.
    • 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

cloneId string Required

The unique identifier for the cloned voice, obtained after successfully polling a Voice Clone task.

text string Required

The text string to be synthesized into speech.

lan string Required

The target language code for the voice output.

ValueDescription
enEnglish
zh-CNChinese (Simplified)
esSpanish
frFrench
deGerman
itItalian
ptPortuguese
plPolish
trTurkish
ruRussian
nlDutch
csCzech
arArabic
huHungarian
koKorean
jaJapanese
viVietnamese

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 synthesis task. Use this ID with the Polling API to retrieve the generated audio.

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": "9af2a0cee7734bbdabea229265d09869",
            "status": 3,
            "executionTime": 3697,
            "expire": 1740648465317,
            "taskType": "tts_clone"
        },
        "audios": [
            {
                "audioUrl": "https://dreamface-resource-aigc.oss-us-east-1.aliyuncs.com/apiDocsAdmin/2025-4-1744804212969-dottsClone_result.wav",
                "audioType": ".wav"
            }
        ]
    }
}
Request
cURL
curl -X POST 'https://api.newportai.com/api/async/do_tts_clone' \
  -H "Authorization: Bearer {{key}}" \
  -H 'Content-Type: application/json' \
  -d '{
    "cloneId": "222b09922fcf4a028e9ecbc86ac2534c",
    "text": "let us see this world",
    "lan": "en"
}'
0Successful
{
    "code": 0,
    "message": "success",
    "data": {
        "taskId": "9af2a0cee7734bbdabea229265d09869"
    }
}