Voice Clone

Upload audio to be cloned to generate custom voices, configurable with trial text to generate demo audio, supports noise reduction.
POST/v1/audio/voices/clone

Authorization

AuthorizationstringheaderRequired
HTTP: Bearer Auth

Request Header

Content-Typeenum<string>Default: application/jsonRequired

Request Bodyapplication/json

file_idlongRequired

The file_id of the audio to be cloned, obtained from the file upload interface.
Supported uploaded files must comply with the following specifications:
  • The uploaded audio file format must be mono wav format;
  • The duration of the uploaded audio file should be at least 5 seconds and at most 2 minutes. Recommended duration 5-15 seconds.

voice_idstringRequired

Custom voice ID.
A custom ID must meet the following rules:
  • 8-64 characters long, and must start with an English letter;
  • May only contain letters, numbers, hyphens (-), and underscores (_); the last character cannot be a hyphen or underscore;
  • Must not conflict with existing cloned/designed voices.

clone_promptobject

Providing prompt audio and corresponding text during cloning can improve the cloning effect.

clone_prompt.prompt_audiointeger

Prompt audio file_id (obtained from the file upload interface, purpose="prompt_audio")

clone_prompt.prompt_textstring

Text corresponding to the prompt audio

textstring

Text used for auditioning the cloned voice. If passed, the API will return demo audio synthesized based on this text. Maximum 50,000 characters.

modelenum<string>Required

Available model code options:u2-tts-clone

Response Body Structure

input_sensitiveboolean

Whether the input content contains sensitive words

input_sensitive_typeinteger

Type of sensitive words

demo_audiostring

Audition audio URL. Returned only when text is provided; when omitted or empty, an empty string is returned.

base_respobject

Status code and details of this request

base_resp.status_codeinteger

Status code (0=normal; 100001=parameter error; 100101=authentication failed; 100501=triggered RPM rate limit; 100999=internal system error)

base_resp.status_msgstring

Status details