predict_duration
Predict the expected audio duration in seconds for a given text to estimate credit cost before synthesizing speech.
Instructions
Predict the expected output audio duration in seconds for a given text WITHOUT producing any audio file. Accepts the same parameters as text_to_speech. There is no text-length limit: long text is automatically split (auto-chunked), and credit usage and latency scale with the length of the text. Use this to estimate credit cost before synthesizing — credit usage is proportional to the predicted duration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| model | No | ||
| speed | No | ||
| style | No | ||
| language | No | ||
| voice_id | No | ||
| pitch_shift | No | ||
| output_format | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |