Peke ki ngā ihirangi

Index TTS 2.0

Whakauru

id tauira index-tts-2/text-to-speech
# 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/index-tts-2/text-to-speech?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3",
    "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"

Tae atu ki te $ 0.06 mō ia whakahaerenga ka utua mō te whakamahinga tūturu, ka whakahokia te toenga Whakahaerehia ki tēnei whārangi

Tikina he kī API
bilibili Kuputuhi ki te Kōrero #text-to-speech

Te whakahiato kōrero mai i tētahi topenga reo tohutoro me te kuputuhi, me te whakahaere kare ā-roto mā te ororongo, te tono, ngā kaha kare ā-roto rānei

bilibili · Ororongo

Kei konei tō hua tuatahi

Hangaia he tono ki raro nei, ka whakahaere mā tō kī API. Ka tāruatia ngā putanga ki tō mātou rokiroki, ka puritia mō ake tonu atu, mō rānei 7 rā mō te kore utu.

Hangaia he tono

Ka hangaia ngā mana whakahaere mai i te aronuinga o te tauira. Ka whakahoungia te waehere me te utu ina whakarerekē koe.

•e hiahiatia ana

Tohutohu mō te reo hei whakaputa.

•e hiahiatia ana audio_url
Whakataka he kōnae,

Kōnae ororongo pūtake e whakamahia ana hei whakaputa reo.

Arā atu emotion_prompt · emotional_audio_url · strength · should_use_prompt_for_emotion · enable_safety_checker · emotional_strengths

Ngā tohutohu āhua kare ā-roto me whakamahi tahi me `should_use_prompt_for_emotion`.

Whakataka he kōnae,

Kōnae ororongo tohutoro e whakamahia ana hei tango i te āhua kare ā-roto.

taunoa 1

Ka kaha ake te awe kare ā-roto i te whakawhiti āhua ina whakanuia tēnei tautuhinga kaha.

Ngā uara kaha mō ia kare ā-roto hei whakatikatika taipitopito.

POST /run/index-tts-2/text-to-speech?wait=20 utu → $ 0.06
# 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/index-tts-2/text-to-speech?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3",
    "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"

Whakahaerehia tēnei tono

Ka noho tō kī ki tēnei pūtirotiro: ka tukuna ki te Doitong API anake, ā, ka tiakina ki te localStorage anake ina tohua e koe te Mahara. Tikina he kī API

Mō Index TTS 2.0

Ka waihanga kōrero mō te kuputuhi kei `prompt`, mā te reo mai i te topenga tohutoro kei `audio_url`. Ka taea te tango i te āhua kare ā-roto mai i tētahi topenga tuarua mā `emotional_audio_url`, ka tauine mā `strength` (0 ki 1), ka whakaritea rānei mā `emotional_strengths`. Hei kē, whakahohea `should_use_prompt_for_emotion`, me `emotion_prompt` motuhake hei kōwhiringa. Ka hoki mai te ororongo hei ahanoa base64.

Ngā tawhā

Tukuna te ingoa tōmua, te ingoa taketake rānei, kaua e rua. Ngā ingoa tōmua

IngoaMomo TaunoaE whakaaetia ana Whakamārama
audio_urle hiahiatia ana audio
Momourl · audio
Kōnae ororongo pūtake e whakamahia ana hei whakaputa reo.
prompte hiahiatia ana
Momostring
Tohutohu mō te reo hei whakaputa.
emotional_audio_urlkōwhiringa
Momourl · audio
Kōnae ororongo tohutoro e whakamahia ana hei tango i te āhua kare ā-roto.
strengthkōwhiringa
Momonumber
Taunoa1
0 – 1
Ka kaha ake te awe kare ā-roto i te whakawhiti āhua ina whakanuia tēnei tautuhinga kaha.
emotional_strengthskōwhiringa
Momoobject
Ngā uara kaha mō ia kare ā-roto hei whakatikatika taipitopito.
emotional_strengths.happykōwhiringa
Momonumber
Taunoa0
0 – 1
Te kaha o te kare harikoa.
emotional_strengths.angrykōwhiringa
Momonumber
Taunoa0
0 – 1
Te kaha o te riri.
emotional_strengths.sadkōwhiringa
Momonumber
Taunoa0
0 – 1
Te kaha o te pōuri.
emotional_strengths.afraidkōwhiringa
Momonumber
Taunoa0
0 – 1
Te kaha o te mataku.
emotional_strengths.disgustedkōwhiringa
Momonumber
Taunoa0
0 – 1
Te kaha o te whakarihariha.
emotional_strengths.melancholickōwhiringa
Momonumber
Taunoa0
0 – 1
Te kaha o te pōuri hōhonu.
emotional_strengths.surprisedkōwhiringa
Momonumber
Taunoa0
0 – 1
Te kaha o te ohorere.
emotional_strengths.calmkōwhiringa
Momonumber
Taunoa0
0 – 1
Te kaha o te mārie.
should_use_prompt_for_emotionkōwhiringa
Momoboolean | null
Taunoafalse
Ina whakahohea, ka whakakapi te tātai kare ā-roto mā te tohutohu i ngā `emotional_strengths` motuhake. Ka ahu mai te āhua kare ā-roto i `emotion_prompt` mēnā ka tukuna, ki te kore, i `prompt`.
emotion_promptkōwhiringa
Momostring | null
Ngā tohutohu āhua kare ā-roto me whakamahi tahi me `should_use_prompt_for_emotion`.
enable_safety_checkerkōwhiringa
Momoboolean
Taunoatrue
Ka taea te whakangāwari i te tātari mā te tautuhi false, mēnā he mana tō te kaiwhakatuwhera.
e hiahiatia ana Ingoa tōmua, e whakaaetia ana hoki

Mō ngā tawhā kōnae, whakamahia he URL tūmatanui https://, he URI data: tae atu ki te 10 MB, he file_url rānei o tētahi tukuake. Ngā kōnae

Putanga

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "index-tts-2/text-to-speech",
  "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": 60,
    "usd": "0.06",
    "charged": 60,
    "refunded": 0
  },
  "input": {
    "audio_url": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3",
    "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
    }
  },
  "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"
  }
}
Ō kōnae, māu e whiriwhiriKo ia url o outputs[] he tārua kei tō mātou rokiroki: ka puritia mō ake tonu atu (ka utua ia GB-marama) mō rānei 7 rā mō te kore utu, e ai ki ngā tautuhinga o tō pūkete, ki te ?storage= rānei.
He ōrite te hanga ki ia tauiratype, url, content_type, width, height me duration, mō ngā pikitia, ataata me te oro. Ko output te ahanoa hua ake o te tauira.
Ngā āpure o te putanga
audio
object {url, content_type, file_name, file_size}Ororongo i whakaputaina, kua whakawaeherehia ki te whakatakotoranga base64.

Mō ngā āpiha AI: kei te wātea tēnei whārangi hei Markdown ki https://doitong.com/mi/developers/models/index-tts-2/text-to-speech.md. Ngā tauira me ngā aratohu katoa: https://doitong.com/developers/llms.txt