beatra文档

预检语音合成

POST
/v1/audio/speech/validate

Request Body

application/jsonRequired
voice
Required
Voice

Opaque Beatra voice_id (preset or cloned)

input
Required
Input

Text to check

Minimum length: 1Maximum length: 50000
modelModel

Model to check against (default auto)

Default: "auto"Value in: "auto" | "minimax-speech-2.8-hd" | "minimax-speech-2.8-turbo"
languageLanguage

BCP-47 language hint

formatFormat

Audio format the create call would use

Default: "mp3"Value in: "mp3" | "wav" | "flac" | "opus" | "pcm"
sample_rateSample Rate

Sample rate in Hz for the chosen format

speedSpeed

Speaking rate (0.5 to 2.0)

Default: 1Minimum: 0.5Maximum: 2
volumeVolume

Volume (0 to 10)

Default: 1Maximum: 10
pitchPitch

Normalized pitch (-1.0 to 1.0)

Default: 0Minimum: -1Maximum: 1
emotionEmotion

Emotion preset for the whole request

subtitle_enableSubtitle Enable

Whether the create call would request subtitles

Default: false
model_optionsModel Options

Expert provider options, same as the create call

Header Parameters

Authorization
Required
string

Bearer API key.

X-Request-Idstring

Optional client request id echoed in the response.

curl -X POST "https://api.beatra.ai/v1/audio/speech/validate" \
  -H "Authorization: string" \
  -H "X-Request-Id: string" \
  -H "Content-Type: application/json" \
  -d '{
    "voice": "string",
    "input": "string",
    "model": "auto",
    "language": "string",
    "format": "mp3",
    "sample_rate": 8000,
    "speed": 1,
    "volume": 1,
    "pitch": 0,
    "emotion": "happy",
    "subtitle_enable": false,
    "model_options": {}
  }'

Validation report

{
  "valid": true,
  "warnings": [
    {
      "code": "string",
      "message": "string",
      "field": "string"
    }
  ],
  "weighted_characters": 0,
  "price_credits": "string",
  "execution": {
    "mode": "string"
  },
  "script_markup": {
    "pause": {
      "syntax": "string",
      "range": [
        0
      ],
      "note": "string"
    },
    "tags": [
      {
        "token": "string",
        "meaning": "string"
      }
    ],
    "pronunciation": {
      "syntax": "string",
      "readings": "string"
    },
    "escape": "string"
  },
  "limitations": [
    "string"
  ]
}

最后更新