音色快速复刻
方法: POST路径: /minimax/v1/voice_clone
使用本接口进行音色快速复刻。 复刻得到的音色若 7 天内未正式调用,则系统会删除该音色。
请求参数
Header 参数
text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}Body 参数 application/json
text
file_id
integer
必需
voice_id
string
必需
clone_prompt
object
可选
prompt_audio
integer
必需
prompt_text
string
必需
text
string
可选
model
string
可选
need_noise_reduction
boolean
可选
need_volume_normalization
boolean
可选
aigc_watermark
boolean
可选
示例
{
"file_id"
:
123456789
,
"voice_id"
:
"<voice_id>"
,
"clone_prompt"
:
{
"prompt_audio"
:
987654321
,
"prompt_text"
:
"This voice sounds natural and pleasant."
}
,
"text"
:
"A gentle breeze sweeps across the soft grass(breath), carrying the fresh scent along with the songs of birds."
,
"model"
:
"speech-2.8-hd"
,
"need_noise_reduction"
:
false
,
"need_volume_normalization"
:
false
,
"aigc_watermark"
:
false
}请求示例代码
Shell
bash
curl --location --request POST '/minimax/v1/voice_clone' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"file_id": 123456789,
"voice_id": "<voice_id>",
"clone_prompt": {
"prompt_audio": 987654321,
"prompt_text": "This voice sounds natural and pleasant."
},
"text": "A gentle breeze sweeps across the soft grass(breath), carrying the fresh scent along with the songs of birds.",
"model": "speech-2.8-hd",
"need_noise_reduction": false,
"need_volume_normalization": false,
"aigc_watermark": false
}'返回响应
🟢 200 成功
内容类型: application/json
响应结构
text
file
object
可选
file_id
integer
文件的唯一标识符
可选
bytes
integer
可选
文件大小,以字节为单位
created_at
integer
可选
创建文件时的 Unix 时间戳,以秒为单位
filename
string
文件的名称
可选
purpose
string
文件的使用目的
可选
base_resp
object
可选
status_code
integer
可选
状态码及其分别含义如下:
0,请求成功
1002,触发限流,请稍后再试
1004,账号鉴权失败,请检查 API-Key 是否填写正确
1008,账号余额不足
1026,图片描述涉及敏感内容
2013,传入参数异常,请检查入参是否按要求填写
2049,无效的api key
status_msg
string
状态详情
可选示例
json
{
"input_sensitive": false,
"input_sensitive_type": 0,
"demo_audio": "",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}