跳转到主要内容
POST
https://api.ppio.com
/
v3
/
minimax-speech-2.8-hd
MiniMax Speech 2.8 HD 同步语音合成
curl --request POST \
  --url https://api.ppio.com/v3/minimax-speech-2.8-hd \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "text": "<string>",
  "stream": true,
  "voice_modify": {
    "pitch": 123,
    "timbre": 123,
    "intensity": 123,
    "sound_effects": "<string>"
  },
  "audio_setting": {
    "format": "<string>",
    "bitrate": 123,
    "channel": 123,
    "force_cbr": true,
    "sample_rate": 123
  },
  "output_format": "<string>",
  "voice_setting": {
    "vol": 123,
    "pitch": 123,
    "speed": 123,
    "emotion": "<string>",
    "voice_id": "<string>",
    "latex_read": true,
    "text_normalization": true
  },
  "aigc_watermark": true,
  "language_boost": "<string>",
  "stream_options": {
    "exclude_aggregated_audio": true
  },
  "timber_weights": [
    {
      "weight": 123,
      "voice_id": "<string>"
    }
  ],
  "subtitle_enable": true,
  "continuous_sound": true,
  "pronunciation_dict": {
    "tone": [
      {}
    ]
  }
}
'
{
  "data": {
    "audio": "<string>",
    "status": 123,
    "subtitle_file": "<string>"
  },
  "trace_id": "<string>",
  "base_resp": {
    "status_msg": "<string>",
    "status_code": 123
  },
  "extra_info": {
    "bitrate": 123,
    "audio_size": 123,
    "word_count": 123,
    "audio_format": "<string>",
    "audio_length": 123,
    "audio_channel": 123,
    "usage_characters": 123,
    "audio_sample_rate": 123,
    "invisible_character_ratio": 123
  }
}
MiniMax 同步语音合成 API,使用 HTTP 网络通信协议进行同步语音合成。支持多种音色、情绪、语速等参数设置。

请求头

Content-Type
string
必填
枚举值: application/json
Authorization
string
必填
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。

请求体

text
string
必填
需要合成语音的文本,长度限制小于 10000 字符,若文本长度大于 3000 字符,推荐使用流式输出。支持段落切换(换行符)、停顿控制(&lt;#x#&gt;标记)、语气词标签(如(laughs)、(coughs)等,仅 speech-2.8-hd/turbo 支持)
stream
boolean
默认值:false
控制是否流式输出。默认 false,即不开启流式
voice_modify
object
audio_setting
object
output_format
string
默认值:"hex"
控制输出结果形式的参数,可选值范围为 url、hex,默认值为 hex。该参数仅在非流式场景生效,流式场景仅支持返回 hex 形式。返回的 url 有效期为 24 小时可选值:url, hex
voice_setting
object
aigc_watermark
boolean
默认值:false
控制在合成音频的末尾添加音频节奏标识,默认值为 false。该参数仅对非流式合成生效
language_boost
string
是否增强对指定的小语种和方言的识别能力。默认值为 null,可设置为 auto 让模型自主判断可选值:Chinese, Chinese,Yue, English, Arabic, Russian, Spanish, French, Portuguese, German, Turkish, Dutch, Ukrainian, Vietnamese, Indonesian, Japanese, Italian, Korean, Thai, Polish, Romanian, Greek, Czech, Finnish, Hindi, Bulgarian, Danish, Hebrew, Malay, Persian, Slovak, Swedish, Croatian, Filipino, Hungarian, Norwegian, Slovenian, Catalan, Nynorsk, Tamil, Afrikaans, auto
stream_options
object
timber_weights
array
混合音色设置,最多支持 4 种音色混合
subtitle_enable
boolean
默认值:false
控制是否开启字幕服务,默认值为 false。此参数仅在非流式输出场景下有效,且仅对 speech-2.6-hd, speech-2.6-turbo, speech-02-turbo, speech-02-hd, speech-01-turbo, speech-01-hd 模型有效
continuous_sound
boolean
默认值:false
启用该参数,使得子句衔接处更自然,仅支持 speech-2.8-hd 和 speech-2.8-turbo 模型
pronunciation_dict
object

响应

data
object
返回的合成数据对象,可能为 null,需进行非空判断
trace_id
string
本次会话的 id,用于在咨询/反馈时帮助定位问题
base_resp
object
本次请求的状态码和详情
extra_info
object
音频的附加信息