跳转到主要内容
POST
/
v3
/
async
/
minimax-speech-02-turbo
MiniMax Speech-02-turbo 异步语音合成
curl --request POST \
  --url https://api.ppio.com/v3/async/minimax-speech-02-turbo \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "text": "<string>",
  "voice_setting": {
    "speed": 123,
    "vol": 123,
    "pitch": 123,
    "voice_id": "<string>",
    "emotion": "<string>",
    "text_normalization": true
  },
  "audio_setting": {
    "sample_rate": 123,
    "bitrate": 123,
    "format": "<string>",
    "channel": 123
  },
  "pronunciation_dict": {
    "tone": [
      {}
    ]
  },
  "language_boost": "<string>",
  "voice_modify": {
    "pitch": 123,
    "intensity": 123,
    "timbre": 123,
    "sound_effects": "<string>"
  },
  "aigc_watermark": true
}
'
import requests

url = "https://api.ppio.com/v3/async/minimax-speech-02-turbo"

payload = {
"text": "<string>",
"voice_setting": {
"speed": 123,
"vol": 123,
"pitch": 123,
"voice_id": "<string>",
"emotion": "<string>",
"text_normalization": True
},
"audio_setting": {
"sample_rate": 123,
"bitrate": 123,
"format": "<string>",
"channel": 123
},
"pronunciation_dict": { "tone": [{}] },
"language_boost": "<string>",
"voice_modify": {
"pitch": 123,
"intensity": 123,
"timbre": 123,
"sound_effects": "<string>"
},
"aigc_watermark": True
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
text: '<string>',
voice_setting: {
speed: 123,
vol: 123,
pitch: 123,
voice_id: '<string>',
emotion: '<string>',
text_normalization: true
},
audio_setting: {sample_rate: 123, bitrate: 123, format: '<string>', channel: 123},
pronunciation_dict: {tone: [{}]},
language_boost: '<string>',
voice_modify: {pitch: 123, intensity: 123, timbre: 123, sound_effects: '<string>'},
aigc_watermark: true
})
};

fetch('https://api.ppio.com/v3/async/minimax-speech-02-turbo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ppio.com/v3/async/minimax-speech-02-turbo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'voice_setting' => [
'speed' => 123,
'vol' => 123,
'pitch' => 123,
'voice_id' => '<string>',
'emotion' => '<string>',
'text_normalization' => true
],
'audio_setting' => [
'sample_rate' => 123,
'bitrate' => 123,
'format' => '<string>',
'channel' => 123
],
'pronunciation_dict' => [
'tone' => [
[

]
]
],
'language_boost' => '<string>',
'voice_modify' => [
'pitch' => 123,
'intensity' => 123,
'timbre' => 123,
'sound_effects' => '<string>'
],
'aigc_watermark' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.ppio.com/v3/async/minimax-speech-02-turbo"

payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"voice_setting\": {\n \"speed\": 123,\n \"vol\": 123,\n \"pitch\": 123,\n \"voice_id\": \"<string>\",\n \"emotion\": \"<string>\",\n \"text_normalization\": true\n },\n \"audio_setting\": {\n \"sample_rate\": 123,\n \"bitrate\": 123,\n \"format\": \"<string>\",\n \"channel\": 123\n },\n \"pronunciation_dict\": {\n \"tone\": [\n {}\n ]\n },\n \"language_boost\": \"<string>\",\n \"voice_modify\": {\n \"pitch\": 123,\n \"intensity\": 123,\n \"timbre\": 123,\n \"sound_effects\": \"<string>\"\n },\n \"aigc_watermark\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.ppio.com/v3/async/minimax-speech-02-turbo")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"text\": \"<string>\",\n \"voice_setting\": {\n \"speed\": 123,\n \"vol\": 123,\n \"pitch\": 123,\n \"voice_id\": \"<string>\",\n \"emotion\": \"<string>\",\n \"text_normalization\": true\n },\n \"audio_setting\": {\n \"sample_rate\": 123,\n \"bitrate\": 123,\n \"format\": \"<string>\",\n \"channel\": 123\n },\n \"pronunciation_dict\": {\n \"tone\": [\n {}\n ]\n },\n \"language_boost\": \"<string>\",\n \"voice_modify\": {\n \"pitch\": 123,\n \"intensity\": 123,\n \"timbre\": 123,\n \"sound_effects\": \"<string>\"\n },\n \"aigc_watermark\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.ppio.com/v3/async/minimax-speech-02-turbo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"text\": \"<string>\",\n \"voice_setting\": {\n \"speed\": 123,\n \"vol\": 123,\n \"pitch\": 123,\n \"voice_id\": \"<string>\",\n \"emotion\": \"<string>\",\n \"text_normalization\": true\n },\n \"audio_setting\": {\n \"sample_rate\": 123,\n \"bitrate\": 123,\n \"format\": \"<string>\",\n \"channel\": 123\n },\n \"pronunciation_dict\": {\n \"tone\": [\n {}\n ]\n },\n \"language_boost\": \"<string>\",\n \"voice_modify\": {\n \"pitch\": 123,\n \"intensity\": 123,\n \"timbre\": 123,\n \"sound_effects\": \"<string>\"\n },\n \"aigc_watermark\": true\n}"

response = http.request(request)
puts response.read_body
{
  "task_id": "<string>"
}
该 API 支持基于文本到语音的异步生成,单次文本生成传输最大支持 100 万字符,生成的完整音频结果支持异步的方式进行检索。支持 100+系统音色、复刻音色自主选择;支持语调、语速、音量、比特率、采样率、输出格式自主调整。 提交长文本语音合成请求后,需要注意的是返回的 url 的有效期为自 url 返回开始的 24 个小时,请注意下载信息的时间。
适用于整本书籍等长文本的语音生成,任务排队耗时可能会较长。短句生成、语音聊天、在线社交等场景,建议使用 同步调用语音合成

请求头

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

请求体

text
string
必填
待合成的文本,限制最长 5 万字符。
voice_setting
object
必填
audio_setting
object
pronunciation_dict
object
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'
voice_modify
object
声音效果器设置,该参数支持的音频格式:mp3, wav, flac
aigc_watermark
boolean
默认值:false
控制在合成音频的末尾添加音频节奏标识,默认值为 False。

响应参数

task_id
string
必填
异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 以获取生成结果

示例

以下是如何使用 Minimax Speech-02-turbo 异步请求 API 的示例。
  1. 通过向 Minimax Speech-02-turbo API 发送 POST 请求来生成 task_id。
请求:
curl \
-X POST https://api.ppio.com/v3/async/minimax-speech-02-turbo \
-H "Authorization: Bearer $your_api_key" \
-H "Content-Type: application/json" \
-d '{
  "text": "近年来,人工智能在国内迎来高速发展期,技术创新与产业应用齐头并进。从基础的大模型研发到语音识别、图像处理、自然语言理解等关键技术突破,AI 正在深度赋能医疗、金融、制造、交通等多个领域。同时,政策支持和资本推动加速了技术落地,众多科技企业、创业团队和科研机构持续投入,形成了活跃的创新生态。AI 正逐步从实验室走向实际生产力,成为推动数字中国建设和经济高质量发展的重要引擎,未来发展潜力巨大。",
  "voice_setting": {
    "speed": 1.1,
    "voice_id": "male-qn-jingying",
    "emotion": "happy"
  }
}'
响应:
{
    "task_id": "{返回的 Task ID}"
}
  1. 使用 task_id 获取输出视频。 2xx 范围内的 HTTP 状态码表示请求已成功接受,而 5xx 范围内的状态码表示内部服务器错误。 您可以在响应的 audios 字段中获取音频 audio_url。
响应:
{
  "extra": {},
  "task": {
    "task_id": "abb22f2c-e493-4795-b542-f8d7f17e193d",
    "task_type": "MINIMAX_SPEECH_02_TURBO",
    "status": "TASK_STATUS_SUCCEED",
    "reason": "",
    "eta": 0,
    "progress_percent": 0
  },
  "images": [],
  "videos": [],
  "audios": [
    {
      "audio_url": "https://faas-minimax-video-1312767721.cos.ap-shanghai.myqcloud.com/test/288778355781984-c70616a1-8e73-43e2-ad2a-6863359f15da.mp3?q-sign-algorithm=sha1&q-ak=AKIDHOHvKVnrgHkyxhCTyOdeSjoiRxGPSJ0V&q-sign-time=1752062752%3B1752066352&q-key-time=1752062752%3B1752066352&q-header-list=host&q-url-param-list=&q-signature=2d1dcc503e1006c824c5220ba5f930ddc4562c1e",
      "audio_url_ttl": "0",
      "audio_type": "mp3",
      "audio_metadata": null
    }
  ]
}
音频文件:
最后修改于 2026年2月5日