创建异步语音合成任务 V2
OpenAPI Specification
yaml
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/minimax/v1/t2a_async_v2:
post:
summary: 创建异步语音合成任务 V2
deprecated: false
description: https://platform.minimaxi.com/docs/api-reference/speech-t2a-async-create
operationId: createAsyncTextToAudioTask
tags:
- 海螺 Minimax 平台
- 异步语音合成
parameters:
- name: Content-Type
in: header
description: 请求体的媒介类型,必须设置为 application/json 以确保请求数据的格式为 JSON
required: true
example: ''
schema:
type: string
enum:
- application/json
default: application/json
requestBody:
content:
application/json:
schema:
type: object
properties: {}
examples:
文本输入(基础):
value:
model: speech-02-hd
text: 真正的危险不是计算机开始像人一样思考,而是人开始像计算机一样思考。
voice_setting:
voice_id: moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85
speed: 1
vol: 1
pitch: 0
summary: 直接提供文本内容
文本输入(完整参数):
value:
model: speech-2.8-hd
text: 真正的危险不是计算机开始像人一样思考(sighs),而是人开始像计算机一样思考。计算机只是可以帮我们处理一些简单事务。
language_boost: auto
voice_setting:
voice_id: audiobook_male_1
speed: 1
vol: 1
pitch: 1
emotion: calm
pronunciation_dict:
tone:
- 危险/dangerous
audio_setting:
audio_sample_rate: 32000
bitrate: 128000
format: mp3
channel: 2
voice_modify:
pitch: 0
intensity: 0
timbre: 0
sound_effects: spacious_echo
aigc_watermark: false
summary: 使用所有可选参数的文本输入
文件输入(TXT):
value:
model: speech-2.8-hd
text_file_id: 123456789
language_boost: Chinese
voice_setting:
voice_id: audiobook_male_1
speed: 1.2
vol: 1.5
pitch: 0
pronunciation_dict:
tone:
- 草地/(cao3)(di1)
audio_setting:
audio_sample_rate: 44100
bitrate: 256000
format: flac
channel: 2
summary: 使用 TXT 文件 ID 作为输入
文件输入(ZIP批量):
value:
model: speech-2.8-turbo
text_file_id: 987654321
voice_setting:
voice_id: English_Graceful_Lady
speed: 1
vol: 1
audio_setting:
format: mp3
bitrate: 128000
summary: 使用 ZIP 压缩包批量处理
长文本输入:
value:
model: speech-2.8-hd
text: 这是一段很长的文本内容...
voice_setting:
voice_id: Chinese (Mandarin)_Lyrical_Voice
speed: 1
summary: 处理长文本(接近 5 万字符限制)
responses:
'200':
description: 任务创建成功,返回任务 ID 和相关信息
content:
application/json:
schema:
type: object
properties: {}
examples:
任务创建成功:
summary: 任务成功创建的标准响应
value:
task_id: '95157322514444'
task_token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
file_id: 95157322514444
usage_characters: 101
base_resp:
status_code: 0
status_msg: success
headers: {}
x-apifox-name: ''
'400':
description: 请求参数错误
content:
application/json:
schema:
type: object
properties: {}
examples:
参数错误:
summary: 参数错误
value:
base_resp:
status_code: 2013
status_msg: 参数错误:text 和 text_file_id 必须提供其中之一
headers: {}
x-apifox-name: ''
'401':
description: 鉴权失败
content:
application/json:
schema:
type: object
properties: {}
examples:
鉴权失败:
summary: 鉴权失败
value:
base_resp:
status_code: 1004
status_msg: 鉴权失败,请检查 API-Key 是否正确
headers: {}
x-apifox-name: ''
'429':
description: 触发限流
content:
application/json:
schema:
type: object
properties: {}
examples:
触发限流:
summary: 触发限流
value:
base_resp:
status_code: 1002
status_msg: 触发限流,请稍后再试
headers: {}
x-apifox-name: ''
security: []
x-apifox-folder: 海螺 Minimax 平台
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443236/apis/api-415392319-run
components:
schemas: {}
securitySchemes:
bearer:
type: http
scheme: bearer
servers:
- url: https://www.anyapi.vip
description: 正式环境
security:
- bearer: []