Create a cloned voice
Clone a voice of your own from a recording: MiniMax Speech 2.8 voice cloning, or Doubao Voice Cloning 2.0 (`seed-icl-2.0`).
/v1/voice_cloneMiniMax and Doubao share this path; HopBase routes by the request body and the key's group. The two request bodies and responses differ, so pick a series below. If you use both, use a separate key for each.
MiniMax Speech 2.8: 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 24 hours; it is empty without text. 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. 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.
Doubao Voice Cloning 2.0: the body must include "model": "seed-icl-2.0"; send the recording as base64 in audio, and you get back a voice_id starting with hbv_. To synthesize, set model to seed-icl-2.0 and voice to that ID on /v1/audio/speech. During the beta each account can keep at most 1 cloned voice; to switch voices, delete it first or retrain it by passing its voice_id. When cloned-voice capacity is full, the request returns 503 voice_capacity_full. Billing: the demo_text preview is billed at ¥3 per 10,000 characters, the same as synthesis; cloning itself is free, and there is currently no cloning fee; failed requests are not billed. See Doubao voice cloning.
Voices from both 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
Bearer sk-…: an API key created in the console under API keys; its group must include the requested model
Body parametersJSON
file_id with Upload voice clone audio, then pass a voice_id you choose. Uploading and cloning are free; the clone fee is charged once, with the voice's first successful synthesis.File ID returned by the step 1 upload with purpose=voice_clone; single-use
Range≥ 1
A voice name you choose, unique within your account: letters, digits, - and _, starting with a letter and not ending with - or _
Length8–256 chars
Example clip
File ID returned by an upload with purpose=prompt_audio
Range≥ 1
Exact transcript of the example clip, ending with punctuation
Preview text; when set, a preview clip is returned, billed as speech characters (does not count as first use)
Length≤ 1000 chars
Required when text is set
Valuesspeech-2.8-hdspeech-2.8-turbo
Same as the native endpoint
ValuesautoChineseChinese,YueEnglishArabicRussianSpanishFrenchPortugueseGermanTurkishDutchUkrainianVietnameseIndonesianJapaneseItalianKoreanThaiPolishRomanianGreekCzechFinnishHindiBulgarianDanishHebrewMalayPersianSlovakSwedishCroatianFilipinoHungarianNorwegianSlovenianCatalanNynorskTamilAfrikaans
Expected transcript; checked against the source audio with speech recognition
Length≤ 200 chars
Pass threshold for text_validation; official default 0.7
Range0–1
Noise reduction
Defaultfalse
Volume normalization
Defaultfalse
AIGC watermark
Defaultfalse
Always seed-icl-2.0, required; HopBase uses it to route the request to Doubao Voice Cloning
Valuesseed-icl-2.0
The recording as base64 or data:audio/…;base64,…; at most 10 MB after decoding, in wav / mp3 / ogg / m4a / aac / pcm
Detected from the data URI type or the file header when omitted; pcm must be 24 kHz mono and must be stated explicitly
Valueswavmp3oggm4aaacpcm
A verbatim transcript of the recording; if it differs a lot from the audio, cloning fails (400 audio_text_mismatch), so leave it out if unsure
Length≤ 1000 chars
Language code of the recording
Valueszhenjaesidptdefrkoitthvirufilmsares-mxpt-brpltrsv
Preview text; when sent, the response includes a preview clip read in the new voice, billed at the synthesis price
Length4–300 chars
Denoise the recording before cloning
One of your existing cloned voices: retrains that voice, replacing its sound while keeping the same voice_id, and uses one training; omit it to create a new voice
Returns
200Clone succeeded
Whether the input triggered sensitive content
Sensitive content type
Preview audio download link, valid for 24 hours; empty string without text
Returned only with a preview
Billed preview characters
Preview audio duration, milliseconds
{"status_code": 0, "status_msg": "success"} on success; errors do not come here but as a non-200 status code with an error object
0 on success
success on success
Cloned voice ID (starting with hbv_); pass it as voice on /v1/audio/speech
ready can synthesize; training is still training, check again later; failed training failed, retrain by passing the voice_id or delete it
Valuesreadytrainingfailed
Language code of the recording
Trainings left for this voice (15 per voice in total); once used up, delete it and clone again
Creation time, Unix seconds
Returned only when demo_text was sent: the preview clip as base64
Preview clip format, such as wav
Errors
file_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. Doubao: voice_limit_reached (a cloned voice already exists), audio_text_mismatch (recording and text do not match), invalid_audio (recording rejected), no_trainings_left (no trainings left), unknown_voice (the voice_id to retrain does not exist); parameter errors such as a missing model, invalid audio or a demo_text of the wrong length carry no codemissing_api_key / invalid_api_key / api_key_expired)insufficient_quota)model_not_found), or the path does not belong to the group (route_not_found)voice_clone_in_progress, another clone or delete request from the same account has not finished; send again after it finishesrequest body is too large), 16 MiB for Doubaovoice cloning is temporarily unavailable, voice registry is temporarily unavailable; please retry; Doubao voice_capacity_full (cloned-voice capacity is temporarily full), voice_unavailable, voice_registry_unavailable