查看原始 JSON
{
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"text"
],
"~standard": {
"vendor": "zod",
"version": 1,
"jsonSchema": {}
},
"properties": {
"text": {
"type": "string",
"maxLength": 10000,
"minLength": 1,
"description": "要朗读的文本,最多 10000 个字符。可在片段间加入 <#x#> 暂停标记,x 为 0.01 至 99.99 秒;半角括号内支持带声调数字的拼音、IPA 或粤拼。speech-2.8 支持 (laughs)、(sighs)、(coughs)、(gasps) 等语气标签。"
},
"model": {
"enum": [
"speech-2.8-hd",
"speech-2.6-hd",
"speech-02-hd",
"speech-2.8-turbo",
"speech-2.6-turbo",
"speech-02-turbo"
],
"type": "string",
"default": "speech-2.8-turbo",
"description": "语音模型。供应商报价为 hd 每百万字符 100 美元、turbo 60 美元;Toolmu 以当前目录中的 credits 计费。笑声等语气标签仅适用于 speech-2.8。"
},
"stream": {
"type": "boolean",
"const": false,
"default": false,
"description": "不支持流式输出,固定为 false。"
},
"voice_modify": {
"type": "object",
"properties": {
"pitch": {
"type": "integer",
"maximum": 100,
"minimum": -100,
"description": "从低沉(-100)到明亮(100)。"
},
"timbre": {
"type": "integer",
"maximum": 100,
"minimum": -100,
"description": "从饱满(-100)到清脆(100)。"
},
"intensity": {
"type": "integer",
"maximum": 100,
"minimum": -100,
"description": "从强烈(-100)到柔和(100)。"
},
"sound_effects": {
"enum": [
"spacious_echo",
"auditorium_echo",
"lofi_telephone",
"robotic"
],
"type": "string",
"description": "每次只能使用一种效果。"
}
},
"description": "音色效果,要求输出格式为 mp3、wav 或 flac。",
"additionalProperties": false
},
"audio_setting": {
"type": "object",
"properties": {
"format": {
"enum": [
"mp3",
"pcm",
"flac",
"wav",
"pcmu_raw",
"pcmu_wav",
"opus"
],
"type": "string",
"description": "音频容器或编码,默认 mp3。pcmu_raw 和 pcmu_wav 为 8kHz G.711 mu-law,opus 为 Ogg/Opus。"
},
"bitrate": {
"anyOf": [
{
"type": "number",
"const": 32000
},
{
"type": "number",
"const": 64000
},
{
"type": "number",
"const": 128000
},
{
"type": "number",
"const": 256000
}
],
"description": "比特率,仅适用于 mp3,默认 128000。"
},
"channel": {
"anyOf": [
{
"type": "number",
"const": 1
},
{
"type": "number",
"const": 2
}
],
"description": "1 为单声道,2 为立体声,默认 1。"
},
"sample_rate": {
"anyOf": [
{
"type": "number",
"const": 8000
},
{
"type": "number",
"const": 16000
},
{
"type": "number",
"const": 22050
},
{
"type": "number",
"const": 24000
},
{
"type": "number",
"const": 32000
},
{
"type": "number",
"const": 44100
}
],
"description": "采样率,默认 32000。"
}
},
"description": "音频输出设置。",
"additionalProperties": false
},
"output_format": {
"type": "string",
"const": "url",
"default": "url",
"description": "音频固定通过 CDN 链接返回,24 小时后过期;不接受其他输出方式。"
},
"subtitle_type": {
"enum": [
"sentence",
"word"
],
"type": "string",
"description": "字幕时间戳粒度,默认 sentence。"
},
"voice_setting": {
"type": "object",
"properties": {
"vol": {
"type": "number",
"default": 1,
"maximum": 10,
"description": "音量,大于 0 且不超过 10,默认 1。",
"exclusiveMinimum": 0
},
"pitch": {
"type": "integer",
"default": 0,
"maximum": 12,
"minimum": -12,
"description": "音高偏移,范围 -12 至 12;默认 0,保留原始音高。"
},
"speed": {
"type": "number",
"default": 1,
"maximum": 2,
"minimum": 0.5,
"description": "语速,范围 0.5 至 2,默认 1。"
},
"emotion": {
"enum": [
"happy",
"sad",
"angry",
"fearful",
"disgusted",
"surprised",
"calm",
"fluent",
"whisper"
],
"type": "string",
"description": "情绪;不填时由模型根据文本选择。fluent 和 whisper 仅适用于 speech-2.6。"
},
"voice_id": {
"type": "string",
"minLength": 1,
"description": "目标音色 ID。仅在 timbre_weights 混合音色时可省略。支持系统、克隆和 AI 设计音色;系统音色列表见 https://platform.minimax.io/docs/faq/system-voice-id。"
},
"latex_read": {
"type": "boolean",
"default": false,
"description": "朗读 $$ 包围的 LaTeX 公式,仅支持中文,并将 language_boost 设为 Chinese;默认 false。"
},
"text_normalization": {
"type": "boolean",
"default": false,
"description": "朗读前规范化数字和符号,可改善数字读法但略增延迟;默认 false。"
}
},
"description": "音色选择与朗读设置。",
"additionalProperties": false
},
"language_boost": {
"enum": [
"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"
],
"type": "string",
"description": "增强指定语言或方言识别;auto 为自动判断。speech-02 不支持波斯语、菲律宾语或泰米尔语。"
},
"timbre_weights": {
"type": "array",
"items": {
"type": "object",
"required": [
"voice_id",
"weight"
],
"properties": {
"weight": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "相对权重,范围 1 至 100;越高越接近该音色。"
},
"voice_id": {
"type": "string",
"minLength": 1,
"description": "参与混合的音色。"
}
},
"additionalProperties": false
},
"maxItems": 4,
"minItems": 1,
"description": "最多混合 4 种音色,与 voice_setting.voice_id 互斥。"
},
"subtitle_enable": {
"type": "boolean",
"default": false,
"description": "同时返回字幕文件链接,默认 false。"
},
"pronunciation_dict": {
"type": "object",
"properties": {
"tone": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "使用 原文/替换内容 的发音规则,例如 omg/oh my god;中文声调用括号内的 1 至 5 标记。"
}
},
"description": "自定义发音规则。",
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}