{
  "asyncapi": "3.0.0",
  "info": {
    "title": "T2A V2 WebSocket API",
    "version": "1.0.0",
    "description": "WebSocket API for real-time text-to-speech streaming using T2A V2 model",
    "contact": {
      "name": "MiniMax API Support",
      "email": "api@minimaxi.com"
    }
  },
  "servers": {
    "production": {
      "host": "api.minimaxi.com",
      "protocol": "wss",
      "description": "Production WebSocket server for T2A V2 streaming",
      "security": [
        {
          "type": "http",
          "scheme": "bearer",
          "bearerFormat": "JWT"
        }
      ]
    }
  },
  "channels": {
    "t2a_v2_websocket": {
      "address": "/ws/v1/t2a_v2",
      "messages": {
        "receive_connected_success": {
          "$ref": "#/components/messages/ReceiveConnectedSuccess"
        },
        "send_task_start": {
          "$ref": "#/components/messages/SendTaskStart"
        },
        "receive_task_started": {
          "$ref": "#/components/messages/ReceiveTaskStarted"
        },
        "send_task_continue": {
          "$ref": "#/components/messages/SendTaskContinue"
        },
        "receive_task_continued": {
          "$ref": "#/components/messages/ReceiveTaskContinued"
        },
        "send_task_finish": {
          "$ref": "#/components/messages/SendTaskFinish"
        },
        "receive_task_finished": {
          "$ref": "#/components/messages/ReceiveTaskFinished"
        },
        "receive_task_failed": {
          "$ref": "#/components/messages/ReceiveTaskFailed"
        }
      }
    }
  },
  "operations": {
    "sendMessage": {
      "action": "receive",
      "channel": {
        "$ref": "#/channels/t2a_v2_websocket"
      },
      "messages": [
        {
          "$ref": "#/channels/t2a_v2_websocket/messages/send_task_start"
        },
        {
          "$ref": "#/channels/t2a_v2_websocket/messages/send_task_continue"
        },
        {
          "$ref": "#/channels/t2a_v2_websocket/messages/send_task_finish"
        }
      ],
      "summary": ""
    },
    "receiveMessage": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/t2a_v2_websocket"
      },
      "messages": [
        {
          "$ref": "#/channels/t2a_v2_websocket/messages/receive_connected_success"
        },
        {
          "$ref": "#/channels/t2a_v2_websocket/messages/receive_task_started"
        },
        {
          "$ref": "#/channels/t2a_v2_websocket/messages/receive_task_continued"
        },
        {
          "$ref": "#/channels/t2a_v2_websocket/messages/receive_task_finished"
        },
        {
          "$ref": "#/channels/t2a_v2_websocket/messages/receive_task_failed"
        }
      ]
    }
  },
  "components": {
    "messages": {
      "ReceiveConnectedSuccess": {
        "name": "ReceiveConnectedSuccess",
        "title": "建连成功",
        "summary": "成功建立连接后会返回 `connected_success` 事件",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/ReceiveConnectedSuccessEvent"
        },
        "examples": [
          {
            "payload": {
              "session_id": "xxxx",
              "event": "connected_success",
              "trace_id": "0303a2882bf18235ae7a809ae0f3cca7",
              "base_resp": {
                "status_code": 0,
                "status_msg": "success"
              }
            }
          }
        ]
      },
      "SendTaskStart": {
        "name": "TaskStart",
        "title": "任务开始",
        "summary": "发送`任务开始`事件则正式开始合成任务，当服务端返回的 `task_started` 事件时，标志着任务已成功开始。\n只有在接收到该事件后，才能向服务器发送 `task_continue` 事件或 `task_finish` 事件。",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/SendTaskStartEvent"
        },
        "examples": [
          {
            "payload": {
              "event": "task_start",
              "model": "speech-2.8-turbo",
              "language_boost": "Chinese",
              "voice_setting": {
                "voice_id": "male-qn-qingse",
                "speed": 1,
                "vol": 1,
                "pitch": 0
              },
              "pronunciation_dict": {
                "tone": ["处理/(chu3)(li3)", "危险/dangerous"]
              },
              "audio_setting": {
                "sample_rate": 32000,
                "bitrate": 128000,
                "format": "mp3",
                "channel": 1
              }
            }
          }
        ]
      },
      "ReceiveTaskStarted": {
        "name": "ReceiveTaskStarted",
        "title": "任务开始",
        "summary": "服务端返回 `task_started` 事件，标志着任务已成功开始",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/ReceiveTaskStartedEvent"
        },
        "examples": [
          {
            "payload": {
              "session_id": "xxxx",
              "event": "task_started",
              "trace_id": "0303a2882bf18235ae7a809ae0f3cca7",
              "base_resp": {
                "status_code": 0,
                "status_msg": "success"
              }
            }
          }
        ]
      },
      "SendTaskContinue": {
        "name": "TaskContinue",
        "title": "任务继续",
        "summary": "当收到服务端返回的 `task_started` 事件后，任务正式开始，可通过发送 `task_continue` 事件发送要合成的文本，支持顺序发送多个 `task_continue` 事件。\n当最后一次收到服务端返回结果后超过 120s 没有发送新事件时，webSocket 连接自动断开。",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/SendTaskContinueEvent"
        },
        "examples": [
          {
            "payload": {
              "event": "task_continue",
              "text": "真正的危险不是计算机开始像人一样思考(sighs)，而是人开始像计算机一样思考。计算机只是可以帮我们处理一些简单事务。"
            }
          }
        ]
      },
      "ReceiveTaskContinued": {
        "name": "ReceiveTaskContinued",
        "title": "任务继续",
        "summary": "服务端返回 `task_continued` 事件，标志着任务已成功继续",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/ReceiveTaskContinuedEvent"
        },
        "examples": [
          {
            "payload": {
              "data": {
                "audio": "xxx"
              },
              "extra_info": {
                "audio_channel": 1,
                "audio_format": "mp3",
                "audio_length": 9914,
                "audio_sample_rate": 32000,
                "audio_size": 157869,
                "bitrate": 128000,
                "invisible_character_ratio": 0,
                "usage_characters": 158,
                "word_count": 158
              },
              "is_final": true,
              "session_id": "301871346491491",
              "trace_id": "04ee3794e2c9e4a6d5f99e77742f06fd",
              "base_resp": {
                "status_code": 0,
                "status_msg": "success"
              }
            }
          }
        ]
      },
      "SendTaskFinish": {
        "name": "TaskFinish",
        "title": "任务结束",
        "summary": "服务端收到 `task_finish` 事件后，会等待当前队列中所有合成任务完成后，关闭 WebSocket 连接并结束任务。",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/SendTaskFinishEvent"
        },
        "examples": [
          {
            "payload": {
              "event": "task_finish"
            }
          }
        ]
      },
      "ReceiveTaskFinished": {
        "name": "ReceiveTaskFinished",
        "title": "任务结束",
        "summary": "服务端返回 `task_finished` 事件，标志着任务已成功结束",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/ReceiveTaskFinishedEvent"
        },
        "examples": [
          {
            "payload": {
              "session_id": "xxxx",
              "event": "task_finished",
              "trace_id": "0303a2882bf18235ae7a809ae0f3cca7",
              "base_resp": {
                "status_code": 0,
                "status_msg": "success"
              }
            }
          }
        ]
      },
      "ReceiveTaskFailed": {
        "name": "ReceiveTaskFailed",
        "title": "任务失败",
        "summary": "如果接收到 `task_failed` 事件，表示任务失败。此时需要关闭 WebSocket 连接并处理错误。",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/ReceiveTaskFailedEvent"
        },
        "examples": [
          {
            "payload": {
              "session_id": "xxxx",
              "event": "task_failed",
              "trace_id": "0303a2882bf18235ae7a809ae0f3cca7",
              "base_resp": {
                "status_code": 1004,
                "status_msg": "XXXXXXX"
              }
            }
          }
        ]
      }
    },
    "schemas": {
      "ReceiveConnectedSuccessEvent": {
        "type": "object",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "表示整个会话的 id"
          },
          "event": {
            "type": "string",
            "const": "connected_success",
            "description": "表示会话事件类型，建连成功后会返回`connected_success`"
          },
          "trace_id": {
            "type": "string",
            "description": "表示会话中单次请求的 id，用于在咨询/反馈时帮助定位问题"
          },
          "base_resp": {
            "$ref": "#/components/schemas/BaseResp"
          }
        }
      },
      "SendTaskStartEvent": {
        "type": "object",
        "required": ["event", "model", "voice_setting"],
        "properties": {
          "event": {
            "type": "string",
            "enum": ["task_start"],
            "default": ["task_start"],
            "description": "控制发送的指令，当前环节应填写： `task_start`"
          },
          "model": {
            "type": "string",
            "description": "请求的模型版本",
            "enum": [
              "speech-2.8-hd",
              "speech-2.8-turbo",
              "speech-2.6-hd",
              "speech-2.6-turbo",
              "speech-02-hd",
              "speech-02-turbo",
              "speech-01-hd",
              "speech-01-turbo"
            ]
          },
          "voice_setting": {
            "$ref": "#/components/schemas/VoiceSetting"
          },
          "audio_setting": {
            "$ref": "#/components/schemas/AudioSetting"
          },
          "pronunciation_dict": {
            "$ref": "#/components/schemas/PronunciationDict"
          },
          "timbre_weights": {
            "$ref": "#/components/schemas/TimbreWeights"
          },
          "language_boost": {
            "type": "string",
            "description": "是否增强对指定的小语种和方言的识别能力，设置后可以提升在指定小语种/方言场景下的语音表现。默认值为 `null`，如果不明确小语种类型，可设置为 `auto`，模型将自主判断小语种类型\n可选值范围： \n[`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`]\n\n注意：speech-01 和 speech-02 系列模型暂不支持 Persian、Filipino、Tamil 这三个语种。",
            "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"
            ]
          },
          "voice_modify": {
            "$ref": "#/components/schemas/VoiceModify"
          },
          "subtitle_enable": {
            "type": "boolean",
            "description": "控制是否开启字幕服务，默认值为 `false`。仅对 `speech-2.8-hd`, `speech-2.8-turbo`, `speech-2.6-hd`, `speech-2.6-turbo`, `speech-02-hd`, `speech-02-turbo`, `speech-01-hd`, `speech-01-turbo` 模型有效",
            "default": false
          },
          "subtitle_type": {
            "type": "string",
            "description": "字幕粒度，默认值为 `sentence`。可选值：\n- `sentence`：句级别时间戳\n- `word`：词级别时间戳\n- `word_streaming`：流式优化的词级别时间戳",
            "enum": ["sentence", "word", "word_streaming"],
            "default": "sentence"
          },
          "continuous_sound": {
            "type": "boolean",
            "description": "控制模型侧文本切分策略，仅对 `speech-2.8-hd`、`speech-2.8-turbo` 模型有效。\n- `true`：模型侧不切分文本，连续推理生成音频（长文本韵律更自然）\n- `false`：模型侧切分文本，并发推理生成音频（延迟更低）\n\n默认值为 `false`",
            "default": false
          }
        }
      },
      "ReceiveTaskStartedEvent": {
        "type": "object",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "表示整个会话的 id"
          },
          "event": {
            "type": "string",
            "const": "表示会话事件类型，当前环节成功后会返回 `task_started`"
          },
          "trace_id": {
            "type": "string",
            "description": "表示会话中单次请求的 id，用于在咨询/反馈时帮助定位问题"
          },
          "base_resp": {
            "$ref": "#/components/schemas/TaskStartFinishBaseResp"
          }
        }
      },
      "SendTaskContinueEvent": {
        "type": "object",
        "required": ["event", "text"],
        "properties": {
          "event": {
            "type": "string",
            "description": "表示会话事件类型，当前环节应填写 `task_continue`",
            "enum": ["task_continue"],
            "default": ["task_continue"]
          },
          "text": {
            "type": "string",
            "description": "需要合成语音的文本，长度限制小于 10,000 字符\n- 段落切换用换行符标记\n- 停顿控制：支持自定义文本之间的语音时间间隔。使用方式：在文本中增加 `<#x#>` 标记，`x` 为停顿时长（单位：秒），范围 **[0.01, 99.99]**，最多保留两位小数。文本间隔时间需设置在两个可以语音发音的文本之间，不可连续使用多个停顿标记\n- 语气词标签：仅当模型选择 `speech-2.8-hd` 或 `speech-2.8-turbo` 时，支持在文本中插入语气词标签。支持的语气词：`(laughs)`（笑声）、`(chuckle)`（轻笑）、`(coughs)`（咳嗽）、`(clear-throat)`（清嗓子）、`(groans)`（呻吟）、`(breath)`（正常换气）、`(pant)`（喘气）、`(inhale)`（吸气）、`(exhale)`（呼气）、`(gasps)`（倒吸气）、`(sniffs)`（吸鼻子）、`(sighs)`（叹气）、`(snorts)`（喷鼻息）、`(burps)`（打嗝）、`(lip-smacking)`（咂嘴）、`(humming)`（哼唱）、`(hissing)`（嘶嘶声）、`(emm)`（嗯）、`(sneezes)`（喷嚏）"
          }
        }
      },
      "ReceiveTaskContinuedEvent": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "description": "`data` 可能返回为 `null`，参考示例代码时，注意进行非空判断",
            "properties": {
              "audio": {
                "type": "string",
                "description": "合成后的音频片段，采用 `hex` 编码，按照输入定义的格式进行生成（mp3/pcm/flac）"
              }
            }
          },
          "trace_id": {
            "type": "string",
            "description": "表示会话中单次请求的 id，用于在咨询/反馈时帮助定位问题。"
          },
          "session_id": {
            "type": "string",
            "description": "表示整个会话的 id。"
          },
          "event": {
            "type": "string",
            "description": "表示会话类型，当前环节成功后会返回 task_continued`"
          },
          "is_final": {
            "type": "boolean",
            "description": "该请求返回是否完结"
          },
          "extra_info": {
            "$ref": "#/components/schemas/ExtraInfo"
          },
          "base_resp": {
            "$ref": "#/components/schemas/TaskContinueBaseResp"
          }
        }
      },
      "SendTaskFinishEvent": {
        "type": "object",
        "required": ["event"],
        "properties": {
          "event": {
            "type": "string",
            "enum": ["task_finish"],
            "default": ["task_finish"],
            "description": "表示会话事件类型，当前环节应填写 `task_finish`"
          }
        }
      },
      "ReceiveTaskFinishedEvent": {
        "type": "object",
        "properties": {
          "trace_id": {
            "type": "string",
            "description": "表示会话中单次请求的 id，用于在咨询/反馈时帮助定位问题"
          },
          "session_id": {
            "type": "string",
            "description": "表示整个会话的 id"
          },
          "event": {
            "type": "string",
            "description": "表示会话类型，当前环节成功后会返回 `task_finished`"
          },
          "base_resp": {
            "$ref": "#/components/schemas/TaskStartFinishBaseResp"
          }
        }
      },
      "ReceiveTaskFailedEvent": {
        "type": "object",
        "properties": {
          "trace_id": {
            "type": "string",
            "description": "表示会话中单次请求的 id，用于在咨询/反馈时帮助定位问题"
          },
          "session_id": {
            "type": "string",
            "description": "表示整个会话的 id"
          },
          "event": {
            "type": "string",
            "description": "表示会话类型，任务失败会返回 `task_failed`"
          },
          "base_resp": {
            "$ref": "#/components/schemas/TaskFailedBaseResp"
          }
        }
      },
      "VoiceSetting": {
        "type": "object",
        "required": ["voice_id"],
        "properties": {
          "voice_id": {
            "type": "string",
            "description": "合成音频的音色编号。若需要设置混合音色，请设置 timbre_weights 参数，本参数设置为空值。支持系统音色、复刻音色以及文生音色三种类型，以下是部分最新的系统音色（ID），可查看 [系统音色列表](/faq/system-voice-id) 或使用 [查询可用音色 API](/api-reference/voice-management-get) 查询系统支持的全部音色\n\n - **中文**:\n\t- moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85\n\t- moss_audio_aaa1346a-7ce7-11f0-8e61-2e6e3c7ee85d\n\t- Chinese (Mandarin)_Lyrical_Voice\n\t- Chinese (Mandarin)_HK_Flight_Attendant\n- **英文**:\n\t- English_Graceful_Lady\n\t- English_Insightful_Speaker\n\t- English_radiant_girl\n\t- English_Persuasive_Man\n\t- moss_audio_6dc281eb-713c-11f0-a447-9613c873494c\n\t- moss_audio_570551b1-735c-11f0-b236-0adeeecad052\n\t- moss_audio_ad5baf92-735f-11f0-8263-fe5a2fe98ec8\n\t- English_Lucky_Robot\n- **日文**:\n\t- Japanese_Whisper_Belle\n\t- moss_audio_24875c4a-7be4-11f0-9359-4e72c55db738\n\t- moss_audio_7f4ee608-78ea-11f0-bb73-1e2a4cfcd245\n\t- moss_audio_c1a6a3ac-7be6-11f0-8e8e-36b92fbb4f95"
          },
          "speed": {
            "type": "number",
            "format": "float",
            "description": "合成音频的语速，取值越大，语速越快。取值范围 `[0.5,2]`，默认值为1.0",
            "minimum": 0.5,
            "maximum": 2.0,
            "default": 1.0
          },
          "vol": {
            "type": "number",
            "format": "float",
            "description": "合成音频的音量，取值越大，音量越高。取值范围 `(0,10]`，默认值为 1.0",
            "exclusiveMinimum": 0,
            "maximum": 10.0,
            "default": 1.0
          },
          "pitch": {
            "type": "integer",
            "description": "合成音频的语调，取值范围 `[-12,12]`，默认值为 0，其中 0 为原音色输出",
            "minimum": -12,
            "maximum": 12,
            "default": 0
          },
          "emotion": {
            "type": "string",
            "description": "控制合成语音的情绪，参数范围 `[\"happy\", \"sad\", \"angry\", \"fearful\", \"disgusted\", \"surprised\", \"calm\", \"fluent\", \"whisper\"]`，分别对应 8 种情绪：高兴，悲伤，愤怒，害怕，厌恶，惊讶，中性，生动，低语 \r\n- 模型会根据输入文本自动匹配合适的情绪，一般无需手动指定  \r\n- 该参数仅对 `speech-2.8-hd`, `speech-2.8-turbo`, `speech-2.6-hd`, `speech-2.6-turbo`, `speech-02-hd`, `speech-02-turbo`, `speech-01-hd`, `speech-01-turbo` 模型生效 \r\n- 选项 `fluent`, `whisper` 仅对 `speech-2.6-turbo`, `speech-2.6-hd` 模型生效，`speech-2.8-hd`, `speech-2.8-turbo` 模型不支持 `whisper`",
            "enum": [
              "happy",
              "sad",
              "angry",
              "fearful",
              "disgusted",
              "surprised",
              "calm",
              "fluent",
              "whisper"
            ]
          },
          "english_normalization": {
            "type": "boolean",
            "description": "该参数支持英语文本规范化，可提升数字阅读场景的性能，但会略微增加延迟，默认值为 `false`",
            "default": false
          },
          "latex_read": {
            "type": "boolean",
            "description": "控制是否朗读 latex 公式，默认为 `false`\n**需注意**:\n- 仅支持中文，开启该参数后，`language_boost` 参数会被设置为 `Chinese`\n- 请求中的公式需要在公式的首尾加上 `$$`\n- 请求中公式若有 `\"\\\"`，需转义成 `\"\\\\\"`.\n\n示例：一元二次方程根的基本公式\n![The quadratic formula](https://filecdn.minimax.chat/public/d6f62e9a-cd3f-4f55-a237-257eef531683.png)\n\n应表示为 `$$x = \\\\frac{-b \\\\pm \\\\sqrt{b^2 - 4ac}}{2a}$$`",
            "default": false
          }
        }
      },
      "AudioSetting": {
        "type": "object",
        "properties": {
          "sample_rate": {
            "type": "integer",
            "format": "int64",
            "description": "生成音频的采样率。可选范围 `[8000，16000，22050，24000，32000，44100]`，默认为 `32000`"
          },
          "bitrate": {
            "type": "integer",
            "format": "int64",
            "description": "生成音频的比特率。可选范围 `[32000，64000，128000，256000]`，默认值为 `128000`。该参数仅对 `mp3` 格式的音频生效"
          },
          "format": {
            "type": "string",
            "description": "生成音频的格式。`pcmu_raw` 与 `pcmu_wav` 为 G.711 μ-law 编码（采样率 8 kHz；`pcmu_raw` 为无文件头裸数据，`pcmu_wav` 封装在 WAV 容器中）。`opus` 为 Ogg/Opus 编码；流式模式下音频 chunk 需按到达顺序拼接后再解码",
            "enum": ["mp3", "pcm", "flac", "wav", "pcmu_raw", "pcmu_wav", "opus"],
            "default": "mp3"
          },
          "channel": {
            "type": "integer",
            "format": "int64",
            "description": "生成音频的声道数。可选范围：`[1,2]`，其中 `1` 为单声道，`2` 为双声道，默认值为 1"
          }
        }
      },
      "PronunciationDict": {
        "type": "object",
        "properties": {
          "tone": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "定义需要特殊标注的文字或符号对应的注音或发音替换规则。在中文文本中，声调用数字表示：\n一声为 1，二声为 2，三声为 3，四声为 4，轻声为 5\n示例如下：\n`[\"燕少飞/(yan4)(shao3)(fei1)\", \"omg/oh my god\"]`"
          }
        }
      },
      "TimbreWeights": {
        "type": "object",
        "properties": {
          "voice_id": {
            "type": "string",
            "description": "合成音频的音色编号，须和weight参数同步填写。支持系统音色、复刻音色以及文生音色三种类型。系统支持的全部音色可查看 [系统音色列表](/faq/system-voice-id)，也可使用 [查询可用音色 API](/api-reference/voice-management-get) 查询系统支持的全部音色"
          },
          "weight": {
            "type": "integer",
            "format": "int64",
            "description": "合成音频各音色所占的权重，须与 voice_id 同步填写。可选值范围为[1, 100]，最多支持 4 种音色混合，单一音色取值占比越高，合成音色与该音色相似度越高.\n\n```json dark\n\"timbre_weights\": [\n  {\n    \"voice_id\": \"female-chengshu\",\n    \"weight\": 30\n  },\n  {\n    \"voice_id\": \"female-tianmei\",\n    \"weight\": 70\n  }\n]\n```",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "VoiceModify": {
        "type": "object",
        "description": "声音效果器设置",
        "properties": {
          "pitch": {
            "type": "integer",
            "description": "音高调整（低沉/明亮），范围 [-100,100]，数值接近 -100，声音更低沉；接近 100，声音更明亮\n\n![pitch adjustment](https://filecdn.minimax.chat/public/5d210c47-4236-4e81-893b-16cc1ef0302d.png)",
            "minimum": -100,
            "maximum": 100
          },
          "intensity": {
            "type": "integer",
            "description": "强度调整（力量感/柔和），范围 [-100,100]，数值接近 -100，声音更刚劲；接近 100，声音更轻柔\n\n![intensity adjustment](https://filecdn.minimax.chat/public/862d493e-71d5-4d1f-b7c3-9ac51890631b.png)",
            "minimum": -100,
            "maximum": 100
          },
          "timbre": {
            "type": "integer",
            "description": "音色调整（磁性/清脆），范围 [-100,100]，数值接近 -100，声音更浑厚；数值接近 100，声音更清脆\n\n![timbre adjustment](https://filecdn.minimax.chat/public/5f0e6cae-363a-452b-8d42-fbc4ef5a0510.png)",
            "minimum": -100,
            "maximum": 100
          },
          "sound_effects": {
            "type": "string",
            "description": "音效设置，单次仅能选择一种，可选值：\n1. spacious_echo（空旷回音）\n2. auditorium_echo（礼堂广播）\n3. lofi_telephone（电话失真）\n4. robotic（电音）",
            "enum": [
              "spacious_echo",
              "auditorium_echo",
              "lofi_telephone",
              "robotic"
            ]
          }
        }
      },
      "ExtraInfo": {
        "type": "object",
        "description": "相关额外信息",
        "properties": {
          "audio_length": {
            "type": "integer",
            "format": "int64",
            "description": "音频时长，精确到毫秒"
          },
          "audio_sample_rate": {
            "type": "integer",
            "format": "int64",
            "description": "音频采样率"
          },
          "audio_size": {
            "type": "integer",
            "format": "int64",
            "description": "音频文件大小，单位为字节"
          },
          "bitrate": {
            "type": "integer",
            "format": "int64",
            "description": "音频比特率"
          },
          "audio_format": {
            "type": "string",
            "description": "生成音频文件的格式。取值范围 mp3/pcm/flac"
          },
          "audio_channel": {
            "type": "integer",
            "format": "int64",
            "description": "生成音频声道数。1：单声道，2：双声道"
          },
          "invisible_character_ratio": {
            "type": "integer",
            "format": "float",
            "description": "非法字符占比。非法字符不超过 10%（包含 10%），音频会正常生成并返回非法字符占比，超过进行报错"
          },
          "usage_characters": {
            "type": "integer",
            "format": "int64",
            "description": "计费字符数。本次语音生成的计费字符数"
          },
          "word_count": {
            "type": "integer",
            "format": "int64",
            "description": "已发音的字数统计，包含汉字、数字、字母，不包含标点符号"
          }
        }
      },
      "BaseResp": {
        "type": "object",
        "properties": {
          "status_code": {
            "type": "integer",
            "description": "状态码，`0`代表建连成功.\n更多状态码信息请参考 [错误码查询列表](/api-reference/errorcode)"
          },
          "status_msg": {
            "type": "string",
            "description": "该请求对应的状态码和详情"
          }
        }
      },
      "TaskStartFinishBaseResp": {
        "type": "object",
        "description": "该请求对应的状态码和详情",
        "properties": {
          "status_code": {
            "type": "integer",
            "description": "状态码。\n- 0: 表示发送成功\n- 2202: 表示非法事件\n更多内容可查看 [错误码查询列表](/api-reference/errorcode) 了解详情"
          },
          "status_msg": {
            "type": "string",
            "description": "状态详情"
          }
        }
      },
      "TaskContinueBaseResp": {
        "type": "object",
        "description": "本次请求的状态码和详情",
        "properties": {
          "status_code": {
            "type": "integer",
            "description": "状态码\n- 0: 请求结果正常\n- 1000: 未知错误\n- 1001: 请求超时\n- 1002: 触发限流\n- 1004: 鉴权失败\n- 1039: 触发 TPM 限流\n- 1042: 非法字符超过 10%\n- 2013: 输入参数信息不正常\n- 2201: 超时断开连接\n- 2202: 非法事件\n- 2203: 空文本，跳过\n- 2204: 超出字符限制，跳过\n- 2205: 请求超限\n更多内容可查看 [错误码查询列表](/api-reference/errorcode) 了解详情"
          },
          "status_msg": {
            "type": "string",
            "description": "状态详情"
          }
        }
      },
      "TaskFailedBaseResp": {
        "type": "object",
        "description": "本次请求的状态码和详情",
        "properties": {
          "status_code": {
            "type": "integer",
            "description": "状态码\n- `1000`: 未知错误\n- `1001`: 超时\n- `1002`: 触发限流\n- `1004`: 鉴权失败\n- `1039`: 触发 TPM 限流\n- `1042`: 非法字符超过 10%\n- `2013`: 输入参数信息不正常\n- `2201`: 超时断开连接\n更多内容可查看 [错误码查询列表](/api-reference/errorcode) 了解详情"
          },
          "status_msg": {
            "type": "string",
            "description": "状态详情"
          }
        }
      }
    }
  }
}
