audio

Validate text-to-speech

Changed on
post/v1/audio/speech/validate

Request

  • Base URL
    https://api.beatra.ai (the document declares no server; this is the origin it was published from)
  • Auth
    none declared

Headers

authorization, string nullable

Request body

SpeechValidateRequest required

Read-only speech check. No callback, signing key, metadata, or idempotency.

voice, string required

Opaque beatra voice_id (preset or cloned)

input, string required

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, 'auto' | 'minimax-speech-2.8-hd' | 'minimax-speech-2.8-turbo' | 'doubao-seed-tts-3.0' | 'doubao-seed-tts-2.0' | 'elevenlabs-v4-turbo' | 'elevenlabs-v4'

Model to check against (default auto)

language, string nullable

BCP-47 language hint

format, 'mp3' | 'wav' | 'flac' | 'opus' | 'pcm'

Audio format the create call would use

sample_rate, 8000 | 16000 | 22050 | 24000 | 32000 | 44100 nullable

Sample rate in Hz for the chosen format

speed, number

Speaking rate (0.5 to 2.0)

volume, number

Volume (0 to 10)

pitch, number

Normalized pitch (-1.0 to 1.0)

emotion, 'happy' | 'sad' | 'angry' | 'fearful' | 'disgusted' | 'surprised' | 'calm' | 'fluent' nullable

Emotion preset for the whole request

subtitle_enable, boolean

Whether the create call would request subtitles

direction, string nullable

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.

previous_text, string nullable

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.

next_text, string nullable

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.

model_options, object nullable

Expert provider options, same as the create call

Response

Validation report

SpeechValidationReport required
valid, boolean required

True when the request passes every preflight check

warnings, TaskWarning[]

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).

weighted_characters, integer required

Weighted character count, the same quantity the create call bills on

estimated_duration_seconds, number nullable

Deterministic estimated audio duration in seconds factoring input, speed, and explicit pauses

price_credits, string required

Estimated credits for the create call

execution, SpeechValidationExecution required
script_markup, SpeechScriptMarkup nullable
limitations, string[]

Capability limits declared by the resolved model

Changes

    • info

      added the new doubao-seed-tts-3.0 enum value to the request property model

    • info

      added the new optional request property next_text

    • info

      added the optional property estimated_duration_seconds to the response with the status