Validate Speech
beatra.speech.validateCheck a speech request before paying for it: parse the markup, list warnings, count weighted characters, estimate speech duration, and return the credit price. This call does not create a task, charge credits, or call the speech engine. The markup vocabulary is on the model card from beatra.models.list.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"voice": "<voice>",
"input": "<input>"
},
"name": "beatra.speech.validate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Text to synthesize. It may contain speech markup such as {pause 0.5}, {laugh}, {pron 行 hang2} or {sub W3C 万维网联盟}; read the vocabulary and limits from the model card (beatra.models.list). Some models also accept inline emotion and performance markup, listed under script_markup on their card; other models skip it with a warning. Malformed markup is corrected or skipped with a markup_adjusted warning instead of failing the request. Each model has its own single-request limit (constraints.input_max_characters, and cjk_input_max_characters where present, on the model card); longer text is refused with a message that says how to split it. | |
| model | No | Model to check against (default auto) | auto |
| pitch | No | Normalized pitch (-1.0 to 1.0) | |
| speed | No | Speaking rate (0.5 to 2.0) | |
| voice | Yes | Opaque beatra voice_id (preset or cloned) | |
| format | No | Audio format the create call would use | mp3 |
| volume | No | Volume (0 to 10) | |
| emotion | No | Emotion preset for the whole request | |
| language | No | BCP-47 language hint | |
| direction | No | Optional natural-language performance direction for the whole request, for example '像在耳边说悄悄话一样,轻声地说' or 'read it like breaking news'. Models and voices that follow it list direction under controls on their model card (with direction_max_characters); anywhere else it is ignored with an option_ignored warning. Effects vary with the voice and the text and are not a guarantee of intensity. | |
| next_text | No | Optional text that comes right after this clip, for example the next line of a dialogue or the next paragraph, so separate calls keep a continuous tone. It is never spoken and never billed; any length is accepted and only its start is used (next_text_head_characters on the model card). Models and voices that do not use it ignore it with an option_ignored warning. | |
| sample_rate | No | Sample rate in Hz for the chosen format | |
| model_options | No | Expert provider options, same as the create call | |
| previous_text | No | Optional text that comes right before this clip, for example the previous line of a dialogue or the previous paragraph, so separate calls keep a continuous tone. It is never spoken and never billed; any length is accepted and only its end is used (previous_text_tail_characters on the model card). Models and voices that do not use it ignore it with an option_ignored warning. | |
| subtitle_enable | No | Whether the create call would request subtitles |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| valid | No | ||
| warnings | No | Non-blocking advisories: markup that was corrected or skipped (markup_adjusted), markup the model does not perform (markup_degraded), controls the model ignores (option_ignored), and voices scheduled for retirement (voice_retiring). | |
| execution | No | ||
| limitations | No | ||
| price_credits | No | ||
| script_markup | No | ||
| weighted_characters | No | ||
| estimated_duration_seconds | No |