查询音频编排报价
解析 prompt_document 中的台词、时间轴、音色、音效和配乐引用,返回人声片段数和预计消耗的积分。报价不会创建任务或扣费。省略 prompt_document 时,根据 text 解析简单时间轴。
认证
示例中的凭证为占位值,请替换后在服务器端运行。
代码示例
curl -X POST 'https://shixux.com/api/v1/audio/compositions/quote' \ -H 'X-API-Key: yb_xxx_yyy' \ -H 'Content-Type: application/json' \ -d '{"text":"[00:00] 欢迎回来。","prompt_document":{"version":1,"parts":[{"type":"text","text":"[00:00] 欢迎回来。"}]},"voice_preset_id":"vp_000000000000000000000001"}'{ "credits": 1, "estimated": true, "segments": 1}application/json- body
model?string模型 ID。图片和视频模型的可用状态、清晰度和费率以对应配置接口的返回为准;语音合成和音频编排可选 indextts-2(默认)或 indextts-2.5。
"indextts-2""indextts-2""indextts-2.5"speed?number语速倍率,范围 0.5–2,默认 1,仅 model 为 indextts-2.5 时可用。
0.5 <= value <= 21prompt_document?结构化台词文档(version 为 1),由 text 片段和 reference 片段组成,用于描述时间轴、音色、音效和配乐。音频编排建议显式传入;省略时根据 text 解析简单时间轴。
text*string要合成的文本,不能全为空白。语音合成中,indextts-2 最多 2048 个字符,indextts-2.5 最多 2000 个字符且须包含文字或数字;音频编排的台词合计最多 5000 个字符。
voice_preset_id?string预置音色 ID,来自预置音色目录。与 voice_asset_id 和 voice_ref_key 互斥。
voice_asset_id?string当前账号的音色资产 ID,例如已保存的设计音色,或以 purpose 为 voice_reference 上传并确认的声音参考,须未过期。
emo_asset_id?string情绪参考素材 ID:以 purpose 为 emotion_reference 上传并确认的 WAV,须属于当前账号且未过期。与 emo_ref_key 互斥,仅 indextts-2 支持。
voice_ref_key?|声音参考的引用值,与 voice_preset_id、voice_asset_id 互斥。通过上传接口登记的声音参考请使用 voice_asset_id。
emo_ref_key?|情绪参考 WAV 的引用值,最大 20 MiB,仅 indextts-2 支持。通过上传接口登记的情绪参考请使用 emo_asset_id。
emo_alpha?Emo Alpha八维情绪向量的整体强度,范围 0–1。使用情绪参考音频时保持默认值 1。仅 indextts-2 支持。
0 <= value <= 11emo_vector?array<>|八维情绪向量,顺序固定为高兴、愤怒、悲伤、害怕、厌恶、忧郁、惊讶、平静。共 8 项,每项范围 0–1.4。与情绪参考音频互斥,仅 indextts-2 支持。
请求成功
application/json- response
credits*numberestimated*booleansegments*integer