MiniMax Speech 2.8 HD API 呼叫參考
高傳真語音,400 多種音色,可控情緒
只要一把 PopNow API 金鑰,就能在自己的程式裡呼叫 MiniMax Speech 2.8 HD。以下列出要填的呼叫名稱、這個型號接受的每個輸入欄位、每次請求花多少點數,以及一段可以直接貼進終端機執行的請求。
參數說明直接取自型號的輸入 schema,目前只有英文。
總覽
- 開發商
- MiniMax
- 產出
- 音訊
- 起價
- 18 點 每 1000 字元 ($0.18)
- 一般耗時
- 約 9 秒
1 點 = 0.01 美元。任務受理時會先保留可能的最高費用,完成後依實際用量結算、無條件進位到整點,多保留的會退回;失敗的任務不扣點數。想在執行前知道確切數字,請先呼叫 POST /api/v1/jobs/quote。
文字轉語音
minimax/speech-2.8-hd/text-to-speech
價格
| 選項 | 點數 (每 1000 字元) | 美元 |
|---|---|---|
預設 | 18 | $0.18 |
參數
| 欄位 | 型別 | 預設值 | 可用值 | 用途 |
|---|---|---|---|---|
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-hd/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"
