跳转到内容

Maya · Batch

集成

模型 id maya/batch
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/maya/batch?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "texts": [
      "Hello from Doitong. This is a short test sentence."
    ],
    "prompts": [
      "Hello from Doitong. This is a short test sentence."
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

此请求: ≈$0.049 49 API 积分 · ≈ ₽5.17 在此页面运行

获取 API 密钥
Maya Research 文本转语音 #text-to-speech#tts

Maya 语音的批处理版本,一次渲染最多 100 段文本及其对应的声音描述

Maya Research · 音频

你的第一个结果会显示在这里

在下方构建请求,并使用你的 API 密钥运行。输出会复制到我们的存储中,可永久保存,也可免费保存 7 天。

构建请求

控件根据模型架构生成。修改控件时,代码和价格会同步更新。

•必填

语音合成文本列表,支持在任意条目中嵌入 <emotion_name> 标签。

•必填

每段文本对应的声音或角色属性,以描述列表提供。描述数量必须与文本数量相等。

高级 sample_rate · output_format · temperature · top_p · max_tokens · repetition_penalty · enable_safety_checker
sample_rate 默认 48 kHz

所有生成共用的音频采样率设置,可选择 24 kHz 以加快处理,或选择 48 kHz 以获得更高质量。

output_format 默认 wav

每段生成语音录音所使用的文件格式。

默认 0.4

应用于每次生成的采样温度。

默认 0.9

应用于每次生成的核采样设置。

默认 2000

每次生成的 SNAC Token 上限。

默认 1.1

应用于每次生成的重复惩罚。

POST /run/maya/batch?wait=20 报价 → $0.049
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/maya/batch?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "texts": [
      "Hello from Doitong. This is a short test sentence."
    ],
    "prompts": [
      "Hello from Doitong. This is a short test sentence."
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

运行此请求

你的密钥会保留在此浏览器中:仅发送到 Doitong API;只有勾选“记住”后才会保存到 localStorage。 获取 API 密钥

关于 Maya · Batch

在一次请求中合成多个音频片段。`texts` 和 `prompts` 均接受 1 到 100 个条目,长度必须一致,以便将每段文本与一个声音描述配对。每段文本都支持情绪标签。采样率、输出格式和温度等设置适用于全部条目,结果包含音频文件列表及其时长。

参数

名称类型 默认值允许值 描述
texts必填
类型string[]
≤ 100 个项目
语音合成文本列表,支持在任意条目中嵌入 <emotion_name> 标签。
prompts必填
类型string[]
≤ 100 个项目
每段文本对应的声音或角色属性,以描述列表提供。描述数量必须与文本数量相等。
temperature可选
类型number
默认值0.4
0 – 2
应用于每次生成的采样温度。
top_p可选
类型number
默认值0.9
0 – 1
应用于每次生成的核采样设置。
max_tokens可选
类型integer
默认值2000
28 – 4,000
每次生成的 SNAC Token 上限。
repetition_penalty可选
类型number
默认值1.1
1 – 2
应用于每次生成的重复惩罚。
sample_rate可选
类型enum
默认值48 kHz
48 kHz24 kHz
所有生成共用的音频采样率设置,可选择 24 kHz 以加快处理,或选择 48 kHz 以获得更高质量。
output_format可选
类型enum
默认值wav
wavmp3
每段生成语音录音所使用的文件格式。
enable_safety_checker可选
类型boolean
默认值true
经过授权的调用方可将其设置为 false,以放宽内容审核。
必填

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "maya/batch",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 49,
    "usd": "0.049",
    "charged": 49,
    "refunded": 0
  },
  "input": {
    "texts": [
      "Hello from Doitong. This is a short test sentence."
    ],
    "prompts": [
      "Hello from Doitong. This is a short test sentence."
    ]
  },
  "output": {
    "audios": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
        "content_type": "audio/mpeg",
        "file_name": "0-output.mp3",
        "file_size": 1843200
      }
    ],
    "durations": [
      5
    ],
    "sample_rate": "48 kHz",
    "total_generation_time": 5.7,
    "average_rtf": 0.15
  },
  "outputs": [
    {
      "type": "audio",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_size": 1843200,
      "duration": 12,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
文件由你选择每个 outputs[].url 都是我们存储中的副本:可永久保存(按 GB-月付费),也可免费保存 7 天,由账户设置或 ?storage= 决定。
所有模型的结构一致图像、视频和音频的字段均为 type、url、content_type、width、height 和 duration。output 是模型自身的结果对象。
输出字段
audios
array of object {url, content_type, file_name, file_size}生成的音频文件,以列表形式返回。
durations
array of number每段生成音频录音的长度,以秒为单位。
sample_rate
string所有生成音频文件共用的采样率。
total_generation_time
number所有音频文件的总生成时间,以秒为单位。
average_rtf
number所有生成结果的平均实时系数。

更多模型:文本转语音

对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh-CN/developers/models/maya/batch.md. 所有模型和指南: https://doitong.com/developers/llms.txt