MiniMax Voice Cloning
MiniMax Voice Cloning creates a cloned voice from a publicly accessible audio file. After the endpoint returns voice_id, pass that value as the voice field when calling /v1/audio/speech with MiniMax Speech 2.8.
Endpoint
http
POST /v1/audio/voice-cloningModel
| Model | Description |
|---|---|
minimax-voice-cloning | MiniMax quick voice cloning |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Use minimax-voice-cloning |
audio_url | string | Yes | Publicly accessible source audio URL |
text | string | No | Preview text. When provided, the response usually includes a preview audio URL |
preview_model | string | Conditional | Required when text is provided. Use speech-2.8-hd or speech-2.8-turbo |
accuracy | number | No | Similarity requirement, commonly 0.7 |
need_noise_reduction | boolean | No | Whether to enable noise reduction |
need_volume_normalization | boolean | No | Whether to enable volume normalization |
clone_prompt | object | No | Prompt audio and matching text for better stability |
clone_prompt fields:
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt_audio_url | string | Yes | Prompt audio URL, recommended to be shorter than 8 seconds |
prompt_text | string | Yes | Text matching the prompt audio, preferably ending with punctuation |
Audio Requirements
| Item | Description |
|---|---|
| Format | mp3, m4a, wav |
| Duration | At least 10 seconds and no more than 5 minutes |
| File size | No more than 20 MB |
| Content | A clear single-speaker recording with low background noise is recommended |
Create A Voice
bash
curl -X POST "https://cubicspaces.cloud/v1/audio/voice-cloning" \
-H "Authorization: Bearer $NEW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-voice-cloning",
"audio_url": "https://example.com/voice.mp3",
"text": "This text is used to preview the cloned voice.",
"preview_model": "speech-2.8-hd",
"accuracy": 0.7,
"need_noise_reduction": true,
"need_volume_normalization": true
}'Response Example
json
{
"demo_audio_url": "https://example.com/demo.mp3",
"voice_id": "voice_abc123"
}Use The Cloned Voice
bash
curl -X POST "https://cubicspaces.cloud/v1/audio/speech" \
-H "Authorization: Bearer $NEW_API_KEY" \
-H "Content-Type: application/json" \
--output cloned-voice.mp3 \
-d '{
"model": "minimax-speech-2.8-hd",
"voice": "voice_abc123",
"input": "This is an example generated with a cloned voice.",
"response_format": "mp3",
"speed": 1
}'Fast-cloned voices may be temporary. After creating one, call that voice_id through /v1/audio/speech as soon as possible to confirm that it is available.