Skip to content

Create a cloned voice

Cloning flow step 2: clone a voice you name from the uploaded recording; cloning itself is free, and the clone fee is charged once with the first successful synthesis.

POST/v1/voice_clone

Pass the file_id from step 1 and a voice_id you choose; then put the voice_id in voice on /v1/audio/speech or voice_setting.voice_id on /v1/t2a_v2 to synthesize. Add text and model to get a preview clip: demo_audio is a download link on api.hop-base.com, valid for 6 hours; it is empty without text.

Billing: uploading and cloning are free. The clone fee is charged once, with the voice's first successful synthesis (the usage record details show an extra voice_clone_activation item); the preview is billed only as speech characters and does not count as first use. Prices are on the pricing page.

Lifecycle: a successful clone automatically deletes the source audio and the example audio, so upload again to clone again; a failed clone keeps the files so you can retry with other parameters. A voice not used for synthesis within 7 days of cloning is deleted automatically, and no clone fee is charged. Voices belong only to your account (on an enterprise account, shared by the member keys under the owner); other accounts cannot use them even if they know the voice_id.

Headers

Authorization:requiredstring

Bearer sk-…: an API key created in the console under API keys; its group must include the requested model

Body parametersJSON

file_id:requiredinteger

File ID returned by the step 1 upload with purpose=voice_clone; single-use

Range≥ 1

voice_id:requiredstring

A voice name you choose, unique within your account: letters, digits, - and _, starting with a letter and not ending with - or _

Length8–256 chars

clone_prompt:optionalobject

Example clip

text:optionalstring

Preview text; when set, a preview clip is returned, billed as speech characters (does not count as first use)

Length≤ 1000 chars

model:optionalstring

Required when text is set

Valuesspeech-2.8-hdspeech-2.8-turbo

language_boost:optionalstring

Same as the native endpoint

ValuesautoChineseChinese,YueEnglishArabicRussianSpanishFrenchPortugueseGermanTurkishDutchUkrainianVietnameseIndonesianJapaneseItalianKoreanThaiPolishRomanianGreekCzechFinnishHindiBulgarianDanishHebrewMalayPersianSlovakSwedishCroatianFilipinoHungarianNorwegianSlovenianCatalanNynorskTamilAfrikaans

text_validation:optionalstring

Expected transcript; checked against the source audio with speech recognition

Length≤ 200 chars

accuracy:optionalnumber

Pass threshold for text_validation; official default 0.7

Range0–1

need_noise_reduction:optionalboolean

Noise reduction

Defaultfalse

need_volume_normalization:optionalboolean

Volume normalization

Defaultfalse

aigc_watermark:optionalboolean

AIGC watermark

Defaultfalse

Returns

200Clone succeeded

input_sensitive:optionalboolean

Whether the input triggered sensitive content

input_sensitive_type:optionalinteger

Sensitive content type

demo_audio:optionalstring

Preview audio download link, valid for 6 hours; empty string without text

extra_info:optionalobject

Returned only with a preview

base_resp:optionalobject

{"status_code": 0, "status_msg": "success"} on success; errors do not come here but as a non-200 status code with an error object

Errors

400file_id already used or expired, invalid or taken voice_id, audio duration out of range, text_validation check failed, text too long, text without model, unknown fields, etc.
401Missing, invalid or expired API key (missing_api_key / invalid_api_key / api_key_expired)
402Balance, or key / member / department quota, exhausted (insufficient_quota)
404The model is not in this key's group (model_not_found), or the path does not belong to the group (route_not_found)
413Request body over 64 KiB: request body is too large
503voice cloning is temporarily unavailable, voice registry is temporarily unavailable; please retry, etc.: retry later

Related