MiniMax Speech 2.8 Turbo API 调用参考
快速语音合成,400 多种音色,可控情绪
用一个 PopNow API 密钥,就能在自己的代码里调用 MiniMax Speech 2.8 Turbo。下面列出要填的调用名、这个型号接受的每个输入字段、每次请求花多少积分,以及一段可以直接粘进终端运行的请求。
参数说明直接取自型号的输入 schema,暂时只有英文。
一览
- 出品方
- MiniMax
- 产出
- 音频
- 起价
- 10.8 积分 每 1000 字符 ($0.108)
- 一般耗时
- 约 7 秒
1 积分 = 0.01 美元。任务受理时先冻结可能的最高费用,完成后按实际用量结算、向上取整到整积分,多冻的退回;失败的任务不扣积分。想在运行前知道确切数字,先调 POST /api/v1/jobs/quote。
文字转语音
minimax/speech-2.8-turbo/text-to-speech
价格
| 选项 | 积分 (每 1000 字符) | 美元 |
|---|---|---|
默认 | 10.8 | $0.108 |
参数
| 字段 | 类型 | 默认值 | 取值范围 | 作用 |
|---|---|---|---|---|
text必填 | string | — | 最多 5000 个字符 | The words to be spoken, exactly as written. Sound tags such as (sighs) or (laughs) are performed. Billed per 1,000 characters. |
voice_id可选 | string | Calm_Woman | Wise_Woman, Friendly_Person, Inspirational_girl, Deep_Voice_Man, Calm_Woman, Casual_Guy, Lively_Girl, Patient_Man, Young_Knight, Determined_Man, Lovely_Girl, Decent_Boy, Imposing_Manner, Elegant_Man, … (+458) | System voice. The label shows the voice name and, where known, the language it is built for. |
emotion可选 | string | neutral | neutral, happy, sad, angry, fearful, disgusted, surprised | Emotion of the reading. |
speed可选 | number | 1 | 0.5 到 2 | Speaking rate; 1 is the voice's normal pace. |
pitch可选 | integer | 0 | -12 到 12 | Pitch shift in semitones; 0 keeps the voice's own pitch. |
volume可选 | number | 1 | 0.1 到 10 | Loudness multiplier; 1 is the normal level. |
language可选 | string | auto | auto, zh, yue, en, ar, ru, es, fr, pt, de, tr, nl, uk, vi, … (+27) | Language hint that improves pronunciation; auto detects it from the text. |
output_format可选 | string | mp3 | mp3, wav, flac, pcm | File format of the result; pcm is headerless 16-bit little-endian samples. |
sample_rate可选 | integer | — | 8000, 16000, 22050, 24000, 32000, 44100 | Sample rate in Hz. The model uses 32000 when omitted. |
bitrate可选 | integer | — | 32000, 64000, 128000, 256000 | MP3 bitrate in bits per second; ignored for other formats. The model uses 128000 when omitted. |
audio_channels可选 | string | — | mono, stereo | Mono or stereo output. Mono when omitted. |
english_normalization可选 | boolean | false | — | Read numbers, dates and abbreviations in English text the way a person would say them. |
pronunciation_dict可选 | array<object> | — | 最多 100 项 | Custom pronunciations: each alias in the text is read as its pronunciation. |
请求示例
这段请求原样就能运行,没写的字段都用默认值。运行前先把密钥放进环境变量 POPNOW_API_KEY。
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask?wait=60" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "minimax/speech-2.8-turbo/text-to-speech",
"input": {
"text": "Hi there! This voice was created with the PopNow API in just a few seconds."
}
}'响应里会立刻带回 taskId。之后用 GET /api/v1/jobs/recordInfo 取结果,或者在请求里加上 callBackUrl 等通知。
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
