Léim chuig an ábhar

xAI Text to Speech

Comhtháthú

Aitheantas na samhla xai/tts/v1
# 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/xai/tts/v1?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello from Doitong. This is a short test sentence."
  }'

# 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"

An t-iarratas seo: $0.001 1 chreidmheas API Rith ar an leathanach seo

Faigh eochair API

Téacs-go-caint le guthanna ionsuite, roghnú teanga agus clibeanna cainte léiritheacha inlíne

xAI · Fuaim

Beidh do chéad toradh anseo

Tóg iarratas thíos agus rith é le d’eochair API. Cóipeáiltear na haschuir chuig ár stóráil, coinnithe go deo nó ar feadh 7 lá saor in aisce.

Tóg iarratas

Gintear na rialtáin ó scéim na samhla. Nuashonraítear an cód agus an praghas de réir mar a athraíonn tú iad.

•riachtanach 50 / 15000

Téacs sintéise cainte, le seachadadh léiritheach á rialú trí chlibeanna inlíne ([laugh], [pause], [sigh]) nó trí chlibeanna timfhillte (<whisper>text</whisper>, <slow>text</slow>). Ní féidir leis an ionchur dul thar 15,000 carachtar.

Ardleibhéal voice · language · enable_safety_checker · output_format
réamhshocrú eve

Guth ionsuite roghnaithe le haghaidh sintéise cainte.

réamhshocrú auto

Roghnú teanga ó na cóid BCP-47 seo: en, zh, fr, de, hi, id, it, ja, ko, pt-BR, pt-PT, ru, es-MX, es-ES, tr, vi, bn, ar-EG, ar-SA, ar-AE. Le haghaidh braite uathoibríoch ina ionad sin, soláthair 'auto'.

Cumraíocht d'fhormáid na fuaime ginte; is é MP3 an réamhshocrú le ráta samplála 24 kHz agus ráta giotán 128 kbps.

POST /run/xai/tts/v1?wait=20 luachan → $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/xai/tts/v1?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello from Doitong. This is a short test sentence."
  }'

# 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"

Rith an t-iarratas seo

Fanann d'eochair sa bhrabhsálaí seo: seoltar chuig Doitong API amháin í agus sábháiltear (localStorage) í ach amháin má chuireann tú tic le Meabhraigh. Faigh eochair API

Maidir le xAI Text to Speech

Tiontaíonn sé suas le 15,000 carachtar téacs go caint. Roghnaigh as 28 nguth ionsuite agus cód teanga nó braite uathoibríoch. Is féidir clibeanna amhail [laugh], [pause] agus [sigh], nó clibeanna timfhillte amhail <whisper> agus <slow>, a chur sa téacs le seachadadh léiritheach. Cumraíonn `output_format` an comhad fuaime.

Paraiméadair

AinmCineál RéamhshocrúCeadaithe Cur síos
textriachtanach
Cineálstring
≤ 15,000 gcarachtar
Téacs sintéise cainte, le seachadadh léiritheach á rialú trí chlibeanna inlíne ([laugh], [pause], [sigh]) nó trí chlibeanna timfhillte (<whisper>text</whisper>, <slow>text</slow>). Ní féidir leis an ionchur dul thar 15,000 carachtar.
voiceroghnach
Cineálenum
Réamhshocrúeve
carinazaganhelixorionlunairisaltairzenithperseusheliosluxkeplerrigelcosmocelesteursa
+12 eilesiriuslumencastornakshatlasauroralioraaraeveleorexsal
Guth ionsuite roghnaithe le haghaidh sintéise cainte.
languageroghnach
Cineálenum
Réamhshocrúauto
autoenar-EGar-SAar-AEbnzhfrdehiiditjakopt-BRpt-PT
+5 eilerues-MXes-EStrvi
Roghnú teanga ó na cóid BCP-47 seo: en, zh, fr, de, hi, id, it, ja, ko, pt-BR, pt-PT, ru, es-MX, es-ES, tr, vi, bn, ar-EG, ar-SA, ar-AE. Le haghaidh braite uathoibríoch ina ionad sin, soláthair 'auto'.
output_formatroghnach
Cineálobject
Cumraíocht d'fhormáid na fuaime ginte; is é MP3 an réamhshocrú le ráta samplála 24 kHz agus ráta giotán 128 kbps.
output_format.codecroghnach
Cineálenum
Réamhshocrúmp3
mp3wavpcmmulawalaw
Codec le haghaidh ionchódú fuaime; is iad na roghanna atá ar fáil mp3, wav, pcm, mulaw, alaw.
output_format.sample_rateroghnach
Cineálenum
Réamhshocrú24000
80001600022050240004410048000
Minicíocht samplála fuaime, tomhaiste in Hz.
output_format.bit_rateroghnach
Cineálenum
320006400096000128000192000
Ráta giotán d'aschur MP3, réamhshocraithe ag 128000 agus tomhaiste in bps; ní bhaineann sé le codecs eile.
enable_safety_checkerroghnach
Cineálboolean
Réamhshocrútrue
Is féidir an scagadh a mhaolú trí false a shocrú, ar choinníoll go bhfuil údarú ag an nglaoiteoir.
riachtanach

Aschur

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "xai/tts/v1",
  "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": {
    "text": "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.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Do chuid comhad, do roghaIs cóip ar ár stóráil é gach outputs[].url: coinnithe go deo (íoctha in aghaidh GB-mhí) nó ar feadh 7 lá saor in aisce, de réir shocrú do chuntais nó ?storage=.
An cruth céanna ar gach samhailtype, url, content_type, width, height agus duration, d'íomhánna, d'fhíseáin agus d'fhuaim araon. Is é output réad toraidh na samhla féin.
Réimsí aschuir
audio
object {url, content_type, file_name, file_size}Comhad fuaime a tháirgtear leis an nginiúint.

Do ghníomhairí AI: tá an leathanach seo mar Markdown ag https://doitong.com/ga/developers/models/xai/tts/v1.md. Gach samhail agus treoir: https://doitong.com/developers/llms.txt