跳转到内容

Async Text to Speech Pro V1.0

集成

模型 id async/tts-pro/v1.0
# 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/async/tts-pro/v1.0?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transcript": "Hello from Doitong. This is a short test sentence.",
    "voice": {
      "name": "Jennie"
    }
  }'

# 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.001 1 API 积分 在此页面运行

获取 API 密钥
Async 文本转语音 唇形同步 #text-to-speech#voice-clone#lipsync

支持声音选择、可选声音克隆和六种强制语言选项的文本转语音

Async · 音频

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

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

构建请求

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

•必填

要合成为语音的文本内容。

•必填

用于语音合成的声音。

高级 language · output_format
language

合成时强制使用的语言,使用 ISO 639-1 指定。

生成音频的配置。

POST /run/async/tts-pro/v1.0?wait=20 报价 → $0.001
# 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/async/tts-pro/v1.0?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transcript": "Hello from Doitong. This is a short test sentence.",
    "voice": {
      "name": "Jennie"
    }
  }'

# 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 密钥

关于 Async Text to Speech Pro V1.0

使用所选的 `voice` 对象将 `transcript` 转换为语音。可选的 `language` 参数强制使用 English、French、Spanish、German、Italian 或 Portuguese 合成。`output_format` 对象配置音频,结果包含音频文件、其 MIME 类型和字节大小。适用于需要选择特定声音的配音。

参数

名称类型 默认值允许值 描述
transcript必填
类型string
要合成为语音的文本内容。
voice必填
类型object
用于语音合成的声音。
voice.name可选
类型enum
默认值Jennie
JennieStellaMaxHayesElaraCleoFisherCorinThaddeusLucinaAcadiaHuxleyWinsletJethroElioRupert
另外 84 个EiraNyraArianLilyPierceKaelaElowenFreyaLennyAlessaPandoraFiaAbbottKaelOrlaSableMarnieSeraVirelLioraRivenElysDreenaRheaVelaNymeraIsoldeLirienZellaAvennaMirelleCaliaLuneaLucanTarianArloJovanNeronZivenDaxOrienLiorEryxTyrenNoxElricVarianZoranMiroDalenRonixJarekNyxieSorenVionaSeleneRachielCorbinAbigailFaithKimberlyDaveGraceAldenRenlyVioletJoelXavierEsmeraldaRobertLilaBrooksLennoxVanessaSimonNyomiJackPenelopeBraydenAbelNellieConnieAndrewLincoln
要使用的命名预设声音。如果提供了 `id`,则此项无效。
output_format可选
类型object
生成音频的配置。
output_format.container可选
类型enum
默认值mp3
mp3raw
生成音频的容器格式。
output_format.encoding可选
类型enum
pcm_s16lepcm_f32lepcm_mulaw
仅当容器为 'raw' 时应用的 PCM 编码。
output_format.sample_rate可选
类型integer
默认值44100
8,000 – 48,000
输出采样频率,单位为 Hz。
output_format.bit_rate可选
类型integer | null
32,000 – 320,000
输出比特率;仅适用于 'mp3' 容器。
language可选
类型enum
enfresdeitpt
合成时强制使用的语言,使用 ISO 639-1 指定。
必填

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "async/tts-pro/v1.0",
  "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": 1,
    "usd": "0.001",
    "charged": 1,
    "refunded": 0
  },
  "input": {
    "transcript": "Hello from Doitong. This is a short test sentence.",
    "voice": {
      "name": "Jennie"
    }
  },
  "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
    },
    "content_type": "audio/mpeg",
    "size_bytes": 1
  },
  "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}
content_type
string音频 MIME 类型。
size_bytes
integer音频大小,单位为字节。

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