text + voice)和多人对话(dialogue)走同一个接口[laughs]、[whispers]、[sighs] 等音频标签,控制情绪和语气elevenlabs/text-to-speech-v4-turbo)。| 场景 | 传什么 |
|---|---|
| 单人说话 | text 和 voice |
| 多人对话 | dialogue:至少 1 段,每段各自的 text 和 voice |
dialogue 就不需要再传外层的 text、voice;text 和 dialogue 同时传时,以 dialogue 为准,text 被忽略。{
"model": "elevenlabs/text-to-speech-v4",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"dialogue": [
{
"text": "[excitedly] Hey Jessica! Have you tried Eleven v4 yet?",
"voice": "TX3LPaxmHKxFdv7VOQHJ"
},
{
"text": "[whispers] Just did. It can even whisper like this.",
"voice": "cgSgspJ2msm6clMCkdW9"
}
],
"stability": 0.5,
"similarity_boost": 0.75
}
}curl --location 'https://api.kie.ai/api/v1/jobs/createTask' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "elevenlabs/text-to-speech-v4",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"text": "Good morning! [laughs] This message is coming to you through an old phone line.",
"voice": "TX3LPaxmHKxFdv7VOQHJ",
"stability": 0.5,
"similarity_boost": 0.75,
"language_code": "en",
"audio_effects": {
"filter_preset_id": "phone",
"environment_id": "small_room",
"distance": 0.25
}
}
}'{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_12345678"
}
}