AI 音频
AI 配音
多段台词配音 —— 逐句指定文本、音色与情感
AI 配音就是播客的手动模式:你提供逐句台词(文本 + 音色 + 情感 + 语速),合成为一段配音音频。与 AI 播客 共用一套引擎,mode 自动锁定为 manual。异步任务,提交后轮询查状态。
Base URL:
https://api.aiclonevoicefree.com| 鉴权:Authorization: Bearer sk_...
POST /api/v2/voice/dubbing
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
roles | object[] | ✅ | 角色列表:{ name, voice_id, audio_url, volume, model } |
segments | object[] | ✅ | 逐句台词,见下 |
language | string | ⬜ | 目标语言 |
pause_ms | int | ⬜ | 句间停顿(毫秒) |
single_track | bool | ⬜ | 按角色返回多轨 |
generate_subtitle | bool | ⬜ | 生成 SRT 字幕 |
background | object | ⬜ | 背景音乐配置 |
tts_model | string | ⬜ | TTS 模型 |
segments[]:{ text, voice_id, audio_url, role, speed_ratio, pitch_ratio, volume_ratio, emotion_mode, emotion_vector(8 维 [joy,anger,sorrow,fear,excitement,depression,surprise,calm]), emotion_text, emotion_reference_audio_url }
计费
同播客:中日韩字符 2 积分/字,其他 1 积分/字,完成时结算。余额不足返回
402。
示例
curl -X POST https://api.aiclonevoicefree.com/api/v2/voice/dubbing \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"roles": [{ "name": "旁白", "audio_url": "https://your-cdn.com/narrator.wav" }],
"segments": [
{ "role": "旁白", "audio_url": "https://your-cdn.com/narrator.wav", "text": "在很久很久以前……", "speed_ratio": 1.0, "emotion_mode": "text", "emotion_text": "平静、温暖" }
],
"generate_subtitle": true
}'响应 202 → { "task_id": "...", "status": "pending", "capability": "voice", "action": "multi-segment" }
取结果
轮询 GET /api/v2/tasks/{task_id},完成时 audioUrl(或单轨模式的多轨)为成片地址。