MiniMax Speech 2.8 HD: справочник по API
Речь высокого качества, 400+ голосов и управление эмоциями
С одним ключом PopNow API вы вызываете MiniMax Speech 2.8 HD прямо из своего кода. Здесь собраны ID модели, которые нужно передать, все поля, которые она принимает, стоимость запроса в кредитах и готовый запрос — его можно вставить в терминал и запустить.
Описания параметров взяты из входной схемы модели и пока доступны только на английском.
Кратко
- Разработчик
- MiniMax
- Результат
- Аудио
- От
- 18 кр. за 1000 символов ($0.18)
- Обычное время
- около 9 с
- ID модели
1 кредит = 0,01 $. При приёме задачи резервируется максимально возможная сумма, а после завершения списывается фактический расход с округлением вверх до целого кредита; остаток возвращается. За задачи, завершившиеся ошибкой, плата не взимается. Точную сумму до запуска покажет POST /api/v1/jobs/quote.
Озвучка текста
minimax/speech-2.8-hd/text-to-speech
Цена
| Вариант | Кредиты (за 1000 символов) | Доллары США |
|---|---|---|
По умолчанию | 18 | $0.18 |
Параметры
| Поле | Тип | По умолчанию | Допустимые значения | Назначение |
|---|---|---|---|---|
textОбязательно | string | — | до 5 000 символов | 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"
