Synthesize Speech
beatra.speech.synthesizeSynthesize speech using a Beatra voice ID. This billable call consumes Beatra credits and creates an asynchronous task. Submit exactly once, then poll with beatra.tasks.get. Reuse the same client_request_id only for an identical retry. The input accepts speech markup. Read the vocabulary and limits from the model card returned by beatra.models.list. beatra.speech.validate checks the input before you submit and does not charge credits.
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>",
"client_request_id": "<client_request_id>"
},
"name": "beatra.speech.synthesize"
}
}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 | Omit unless the user requests a model. | auto |
| pitch | No | Pitch adjustment from -1 to 1: 0 keeps the voice's original pitch, -1 is the lowest and 1 the highest the selected model supports. Use decimals such as 0.25 or -0.5 for subtle tuning. | |
| speed | No | ||
| voice | Yes | Opaque beatra voice_id (preset or cloned) | |
| format | No | mp3 | |
| volume | No | ||
| emotion | No | Provider-neutral discrete speaking emotion | |
| language | No | Optional BCP-47 language tag, for example zh-CN, yue-HK, or en-US. 'auto' explicitly asks the engine to detect the spoken language. Read supported_languages from the selected model's catalog card. When omitted, the voice or provider chooses the language. | |
| 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 | ||
| model_options | No | Per-model-family passthrough options; opaque to the platform, validated per model | |
| 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 | Request sentence-level subtitles with the audio. Subtitles are free; when present, output.subtitles carries the subtitle file URL and format. | |
| client_request_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | ||
| error | No | ||
| usage | No | ||
| status | No | ||
| billing | No | ||
| task_id | No | ||
| terminal | No | ||
| artifacts | No | ||
| resolved_model | No |