跳转到内容

Zonos2 Text to Speech

集成

模型 id zonos2
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/zonos2?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reference_audio_url": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  }'

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

每次运行最高 $0.02 按实际用量收费,剩余部分退款 在此页面运行

获取 API 密钥
Zyphra 文本转语音 参考输入 #text-to-speech#tts#voice-cloning

支持多语言的语音克隆 TTS,提供采样控制,并可选择高度匹配或富有表现力的表达

Zyphra · 音频

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

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

构建请求

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

•必填
拖放文件,或

提供源音色以进行克隆的音频。

高级 language · temperature · top_p · min_p · top_k · max_tokens · seed · accurate_mode · clean_speaker_background · enable_safety_checker
默认 en_us

用于文本规范化的语言选择;仅当代码为以下值之一时才会执行:en_us、en_gb、fr_fr、de、es、it、pt_br、ja、cmn、ko。

默认 1.15

采样时使用的 Temperature。

默认 0

核采样概率;设为 0 可禁用该功能。

默认 0.18

最小概率采样的概率阈值。

默认 106

top-k 采样的截断值;设为 0 可禁用该功能。

音频帧生成上限;未提供最大值时使用模型的上下文限制。

用于生成可复现结果的种子;省略时随机选择。

POST /run/zonos2?wait=20 报价 → $0.02
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/zonos2?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reference_audio_url": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  }'

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

运行此请求

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

关于 Zonos2 Text to Speech

从 `reference_audio_url` 克隆声音并朗读文本,返回 44.1kHz 单声道 WAV 音频以及所使用的随机种子。`language` 为 en_us、en_gb、fr_fr、de、es、it、pt_br、ja、cmn 和 ko 设置文本规范化。`accurate_mode` 在声音相似度和表现力之间进行权衡,采样可通过 `temperature`、`top_p`、`min_p`、`top_k` 和 `max_tokens` 调节(最高 6144)。

参数

名称类型 默认值允许值 描述
reference_audio_url必填
类型url · audio
提供源音色以进行克隆的音频。
language可选
类型string
默认值en_us
用于文本规范化的语言选择;仅当代码为以下值之一时才会执行:en_us、en_gb、fr_fr、de、es、it、pt_br、ja、cmn、ko。
seed可选
类型integer | null
0 – 2,147,483,647
用于生成可复现结果的种子;省略时随机选择。
accurate_mode可选
类型boolean
默认值true
音色匹配度与表现力之间的取舍:True 倾向于更接近的匹配,False 倾向于更富有表现力的语音。
clean_speaker_background可选
类型boolean
默认值false
表示参考音频具有干净的背景。
temperature可选
类型number
默认值1.15
0 – 2
采样时使用的 Temperature。
top_p可选
类型number
默认值0
0 – 1
核采样概率;设为 0 可禁用该功能。
min_p可选
类型number
默认值0.18
0 – 1
最小概率采样的概率阈值。
top_k可选
类型integer
默认值106
0 – 2,048
top-k 采样的截断值;设为 0 可禁用该功能。
max_tokens可选
类型integer | null
1 – 6,144
音频帧生成上限;未提供最大值时使用模型的上下文限制。
enable_safety_checker可选
类型boolean
默认值true
经过授权的调用方可将其设置为 false,以放宽内容审核。
必填

文件参数接受公开的 https:// URL、最大 10 MB 的 data: URI,或上传文件的 file_url。 文件

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "zonos2",
  "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": 20,
    "usd": "0.02",
    "charged": 20,
    "refunded": 0
  },
  "input": {
    "reference_audio_url": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  },
  "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
    },
    "seed": 42
  },
  "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.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/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 格式的输出音频,采样率为 44.1kHz,使用单声道。
seed
integer生成期间应用的种子值。

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