跳转到内容

Maya1

集成

模型 id maya
# 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?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello from Doitong. This is a short test sentence.",
    "prompt": "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 Research · 音频

你的第一个结果将在此显示

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

构建请求

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

•必填 50 / 5000

语音合成文本,允许在任意位置使用 <emotion_name> 形式的情绪标签,例如 'Hello world! <excited> This is amazing!' 或 'I can't believe this <sigh> happened again.'。支持的情绪包括 curious、sarcastic、giggle、gulp、exhale、snort、sing、scream、cry、whisper、excited、angry、gasp、chuckle、sigh、laugh_harder 和 laugh。

•必填 50 / 500

要描述的声音或角色特征,例如强度、音调、语速、音色、音高、口音和年龄。

高级 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.2–0.5 的较低范围更有利于稳定性和一致性。

默认 0.9

用于调整 token 选择多样性的核采样设置。

默认 2000

SNAC token 预算,用于限制音频时长,按每帧 7 tokens 计算。

默认 1.1

应用于 token 重复的惩罚。提高该值可抑制重复伪影。

POST /run/maya?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?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello from Doitong. This is a short test sentence.",
    "prompt": "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 密钥

关于 Maya1

将最多 5000 个字符的文本转换为语音。必填的 `prompt` 最多 500 个字符,用于描述年龄、口音和语调等声音特征。可在文本中嵌入 laugh 或 whisper 等情绪标签。可选择 48 kHz 或 24 kHz 采样率,以及 wav 或 mp3 输出;`max_tokens`限制音频长度。

参数

名称类型 默认值允许值 描述
text必填
类型string
≤ 5,000 个字符
语音合成文本,允许在任意位置使用 <emotion_name> 形式的情绪标签,例如 'Hello world! <excited> This is amazing!' 或 'I can't believe this <sigh> happened again.'。支持的情绪包括 curious、sarcastic、giggle、gulp、exhale、snort、sing、scream、cry、whisper、excited、angry、gasp、chuckle、sigh、laugh_harder 和 laugh。
prompt必填
类型string
≤ 500 个字符
要描述的声音或角色特征,例如强度、音调、语速、音色、音高、口音和年龄。
temperature可选
类型number
默认值0.4
0 – 2
控制音频变化的采样温度:提高温度会带来更多变化,而 0.2–0.5 的较低范围更有利于稳定性和一致性。
top_p可选
类型number
默认值0.9
0 – 1
用于调整 token 选择多样性的核采样设置。
max_tokens可选
类型integer
默认值2000
28 – 4,000
SNAC token 预算,用于限制音频时长,按每帧 7 tokens 计算。
repetition_penalty可选
类型number
默认值1.1
1 – 2
应用于 token 重复的惩罚。提高该值可抑制重复伪影。
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",
  "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": {
    "text": "Hello from Doitong. This is a short test sentence.",
    "prompt": "Hello from Doitong. This is a short test sentence."
  },
  "output": {
    "audio": {
      "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
    },
    "duration": 5,
    "sample_rate": "48 kHz",
    "generation_time": 2.3,
    "rtf": 0.51
  },
  "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 是模型自身的结果对象。
输出字段
audio
object {url, content_type, file_name, file_size}生成的 WAV 或 MP3 语音文件,包含 mono 音频,采样率为 24 kHz 或 48 kHz,由上采样器决定。
duration
number输出音频的长度,以秒为单位。
sample_rate
string输出音频的采样率。
generation_time
number音频生成时间,以秒为单位。
rtf
number实时因子,计算方式为 generation_time 除以 audio_duration;数值越小表示性能越好。

更多模型:文本转语音

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