Quote an audio composition
Parse the script, timeline, voices, sound effects and music references in prompt_document, and return the number of speech segments and the estimated credits. Quoting does not create a job or charge credits. When prompt_document is omitted, text is parsed as a simple timeline.
Authentication
Credentials in the examples are placeholders. Replace them and run the examples on your server.
Code examples
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?stringModel ID. For image and video models, use the corresponding settings endpoint for current availability, resolutions and rates. Speech synthesis and audio composition accept indextts-2 (default) or indextts-2.5.
"indextts-2""indextts-2""indextts-2.5"speed?numberSpeaking-rate multiplier from 0.5 to 2, default 1. Available only with model indextts-2.5.
0.5 <= value <= 21prompt_document?Structured script document (version 1) made of text and reference parts, describing the timeline, voices, sound effects and music. Recommended for audio composition; when omitted, text is parsed as a simple timeline.
text*stringText to synthesize. It must not be all whitespace. In speech synthesis, indextts-2 accepts up to 2048 characters, and indextts-2.5 accepts up to 2000 characters that include a letter or digit. Audio composition scripts are limited to 5000 characters in total.
voice_preset_id?stringPreset voice ID from the preset voice catalog. Mutually exclusive with voice_asset_id and voice_ref_key.
voice_asset_id?stringVoice asset ID of your account, such as a saved designed voice or a voice reference uploaded and confirmed with purpose voice_reference. It must not be expired.
emo_asset_id?stringEmotion reference asset ID: a WAV uploaded and confirmed with purpose emotion_reference, owned by your account and unexpired. Mutually exclusive with emo_ref_key. indextts-2 only.
voice_ref_key?|Voice reference value, mutually exclusive with voice_preset_id and voice_asset_id. For voice references registered through the upload endpoints, use voice_asset_id.
emo_ref_key?|Emotion reference WAV value, up to 20 MiB. indextts-2 only. For emotion references registered through the upload endpoints, use emo_asset_id.
emo_alpha?Emo AlphaOverall strength of the eight-dimensional emotion vector, from 0 to 1. Keep the default of 1 when using emotion reference audio. indextts-2 only.
0 <= value <= 11emo_vector?array<>|Eight-dimensional emotion vector in the fixed order happy, angry, sad, afraid, disgusted, melancholic, surprised, calm. Exactly eight values, each from 0 to 1.4. Mutually exclusive with emotion reference audio. indextts-2 only.
Request succeeded
application/json- response
credits*numberestimated*booleansegments*integer