Appearance
语音合成(TTS)
同步 t2a_v2、异步 t2a_async_v2 与查询
概述
- 同步:
POST /minimaxi/v1/t2a_v2 - 异步:
POST /minimaxi/v1/t2a_async_v2+GET /minimaxi/v1/query/t2a_async_query_v2
同步合成
curl -X POST "https://aiapi.fhddos.com/minimaxi/v1/t2a_v2" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"model":"speech-2.8-hd","text":"欢迎使用 Fhddos","output_format":"hex"}' \ --output minimaxi-tts.mp3异步合成与查询
curl -X POST "https://aiapi.fhddos.com/minimaxi/v1/t2a_async_v2" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"model":"speech-2.8-hd","text":"hello"}' curl "https://aiapi.fhddos.com/minimaxi/v1/query/t2a_async_query_v2?task_id=$TASK_ID" \ -H "Authorization: Bearer $TOKEN"音色别名与情感(voice alias)
为了与 OpenAI 风格保持一致,Fhddos 为常见音色提供别名到 MiniMax 实际音色的映射:
alloy→female-chengshu(女声-成熟)echo→male-qn-qingse(男声-青年-清色)fable→male-qn-jingying(男声-青年-精英)onyx→presenter_malenova→presenter_femaleshimmer→audiobook_female_1
如果你在请求体中填写
voice_id为上述别名,Fhddos 会自动转换为 MiniMax 要求的voice_id;当该音色存在默认情感时,会在未显式指定emotion时自动补全。
自定义别名(渠道自定义参数示例)
json
{
"voice": {
"alloy": "female-chengshu|sad",
"echo": "male-qn-qingse"
}
}返回格式(audio_mode)
- 通过渠道自定义参数可设置音频返回模式:
audio_mode = json(默认):响应体以 JSON 返回,data.audio为 hex 或 URL(由output_format决定)。audio_mode = hex:当output_format=hex时返回裸音频流;当output_format=url时仍返回 JSON。
配置示例(渠道自定义参数)
json
{
"audio_mode": "hex"
}TIP
异步合成任务(t2a_async_v2)在返回 JSON 载荷中会原样保留你的 voice_id 与参数;若你使用了别名,Fhddos 会在上游请求前进行一次转换与情感补全。
关键参数对齐(官方)
output_format: 仅非流式生效,取值hex(默认)或url。url有效期以官方返回为准。emotion:happy/sad/angry/fearful/disgusted/surprised/calm/fluent/whisper。该能力受模型与音色组合限制,并非所有voice_id都支持;例如speech-2.6-hd+male-qn-qingse不建议配置默认happy。sound_effects:spacious_echo/auditorium_echo/lofi_telephone/robotic
OpenAPI
yaml
openapi: 3.0.3
info:
title: Fhddos Core API
version: '1.0'
description: >-
Core OpenAI-compatible and model-family endpoints used by the Fhddos user
docs.
servers:
- url: https://aiapi.fhddos.com
security:
- BearerAuth: []
paths:
/minimaxi/v1/t2a_v2:
post:
tags:
- MiniMaxi
summary: MiniMaxi text-to-speech
requestBody:
$ref: '#/components/requestBodies/JsonObject'
responses:
'200':
$ref: '#/components/responses/JsonObject'
components:
requestBodies:
JsonObject:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GenericObject'
responses:
JsonObject:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GenericObject'
schemas:
GenericObject:
type: object
additionalProperties: true
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: 'Authorization: Bearer <token>'