POST https://www.jiaozitts.com/apia/v1/indextts2_infermultipart/form-dataAuthorization: Bearer <api_key>| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
spk_audio_file | file | 是 | 说话人参考音频文件。格式:mp3、wav;大小:≤20MB |
emo_audio_file | file | 条件必填 | 情感参考音频文件(仅当 emo_control_method=1 时必需) |
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
payload | string (JSON) | 是 | 合成参数 的 JSON 字符串,详见 payload 配置参数 |
model | string | 否 | 模型名称,默认 IndexTeam/IndexTTS-2 |
stream_mode | boolean | 否 | 是否流式输出,默认 true |
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
input | string | 是 | - | 要合成的文本,最大 600 字符 |
emo_control_method | int | 否 | 0 | 情感控制方式:0=无控制,1=音频情感,2=向量情感,3=文本情感 |
emo_alpha | float | 否 | 1.0 | 情感融合权重,范围 0.0 ~ 1.0 |
emo_vec | array[8] | 条件必填 | - | 8 维情感向量,仅 emo_control_method=2 时使用。每个元素 0 ~ 1.2,总和 ≤ 1.5 |
emo_text | string | 条件必填 | - | 情感描述文本,仅 emo_control_method=3 时使用 |
use_random | bool | 否 | false | 情感随机性开关,仅 true 时生效,false 时省略 |