Request body modelstring(Required) Specifies the speech model to use for synthesizing the demo audio. inputobject(Required) Properties actionstring(Required) The action to perform. Set this to voice_clone. audio_urlstring(Required) The URL of the audio file for cloning. The audio must meet the following requirements:
- Supported formats: MP3, M4A, or WAV.
- Duration: 10 seconds to 5 minutes.
- File size: Up to 20 MB.
clone_promptobject(Optional) An audio sample to enhance the similarity and stability of the synthesized voice. Properties prompt_audiostring(Optional) The URL of the sample audio file. The audio must meet the following requirements:
- Supported formats: MP3, M4A, or WAV.
- Duration: Less than 8 seconds.
- File size: Up to 20 MB.
prompt_textstring(Optional) The transcript of the sample audio. Ensure it matches the audio content exactly and ends with a punctuation mark. textstring(Required) The text to be synthesized into the demo audio using the cloned voice. The text cannot exceed 1,000 characters.
The demo audio is billed based on the number of characters, according to the MiniMax model pricing.
- Tone tags: Only supported when using the
speech-2.8-hd or speech-2.8-turbo models. You can insert the following tone tags in the text: (laughs) (laughter), (chuckle) (chuckle), (coughs) (cough), (clear-throat) (clears throat), (groans) (groan), (breath) (breath), (pant) (pant), (inhale) (inhale), (exhale) (exhale), (gasps) (gasp), (sniffs) (sniff), (sighs) (sigh), (snorts) (snort), (burps) (burp), (lip-smacking) (lip smacking), (humming) (humming), (hissing) (hissing), (emm) (um), (whistles) (whistle), (sneezes) (sneeze), (crying) (crying), and (applause) (applause).
voice_id string(Required) A unique identifier for the cloned voice. Example: "MiniMax001". When defining a custom voice_id, follow these rules:
- Must be between 8 and 256 characters long.
- Must start with a letter.
- Can contain letters, numbers, hyphens (-), and underscores (_).
- Cannot end with a hyphen or underscore.
- The voice_id must be unique. An error will occur if the ID already exists.
This parameter is globally unique. We recommend including a timestamp or other unique information in the ID.
language_boostenum<string>(Optional) Default: null Enhances the recognition of specific low-resource languages and dialects. Set to auto to let the model decide. Available Options Chinese, Chinese,Yue, English, Arabic, Russian, Spanish, French, Portuguese, German, Turkish, Dutch, Ukrainian, Vietnamese, Indonesian, Japanese, Italian, Korean, Thai, Polish, Romanian, Greek, Czech, Finnish, Hindi, Bulgarian, Danish, Hebrew, Malay, Persian, Slovak, Swedish, Croatian, Filipino, Hungarian, Norwegian, Slovenian, Catalan, Nynorsk, Tamil, Afrikaans, auto
need_noise_reductionboolean (Optional) Default: false Specifies whether to enable noise reduction for the audio cloning process. need_volume_normalizationboolean (Optional) Default: false Specifies whether to enable volume normalization. aigc_watermarkboolean (Optional) Default: false Specifies whether to add an audio rhythm marker at the end of the synthesized demo audio. | Voice cloningcurl -X POST 'https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \
-H "Authorization: Bearer ${DASH_APIKEY}" \
-H 'Content-Type: application/json; charset=utf-8' \
-d '{
"input": {
"action": "voice_clone",
"voice_id": "bailian-test-voice-22",
"audio_url": "https://dashscope.oss-cn-beijing.aliyuncs.com/samples/audio/cosyvoice/cosyvoice-zeroshot-sample.wav",
"text": "What you say goes."
},
"model": "MiniMax/speech-2.8-turbo"
}'
|