Neidio i'r cynnwys

Maya · Stream

Integreiddio

ID y model maya/stream
# 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/maya/stream?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.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Y cais hwn: ≈$0.049 49 o gredydau API Ei redeg ar y dudalen hon

Cael allwedd API
Maya Research Testun i Leferydd #text-to-speech#tts

Amrywiad ffrydio testun-i-leferydd Maya ar gyfer un testun gyda disgrifiad llais

Maya Research · Sain

Mae eich canlyniad cyntaf yn mynd yma

Adeiladwch gais isod a'i redeg gyda'ch allwedd API. Mae allbynnau'n cael eu copïo i'n storio, wedi'u cadw am byth neu am 7 diwrnod am ddim.

Adeiladu cais

Cynhyrchir rheolyddion o sgema'r model. Mae'r cod a'r pris yn diweddaru wrth i chi eu newid.

•gofynnol 50 / 5000

Testun synthesis lleferydd sy'n caniatáu tagiau emosiwn ar ffurf <emotion_name> mewn unrhyw le, fel yn 'Hello world! <excited> This is amazing!' neu 'I can't believe this <sigh> happened again.'. Yr emosiynau a gefnogir yw curious, sarcastic, giggle, gulp, exhale, snort, sing, scream, cry, whisper, excited, angry, gasp, chuckle, sigh, laugh_harder, a laugh.

•gofynnol 50 / 500

Nodweddion llais neu gymeriad i'w disgrifio, megis dwyster, tôn, cyflymder, timbre, traw, acen ac oedran.

Uwch sample_rate · output_format · temperature · top_p · max_tokens · repetition_penalty · enable_safety_checker
sample_rate rhagosodedig 48 kHz

Dewis cyfradd samplu sain rhwng prosesu cyflymach ar 24 kHz ac allbwn o ansawdd uwch ar 48 kHz.

output_format rhagosodedig wav

Fformat y ffeil sain a ddefnyddir ar gyfer lleferydd wedi'i syntheseiddio.

rhagosodedig 0.4

Tymheredd samplu sy'n rheoli amrywiad sain: mae ei gynyddu'n cyflwyno mwy o amrywiaeth, tra bod yr ystod is o 0.2–0.5 yn ffafrio sefydlogrwydd a chysondeb.

rhagosodedig 0.9

Gosodiad samplu niwclews sy'n addasu amrywiaeth dewis tocynnau.

rhagosodedig 2000

Cyllideb tocynnau SNAC sy'n cyfyngu ar hyd y sain, wedi'i chyfrifo fel 7 tocyn ar gyfer pob ffrâm.

rhagosodedig 1.1

Cosb a gymhwysir i ailadrodd tocynnau. Mae ei chynyddu'n lleihau arteffactau ailadrodd.

POST /run/maya/stream?wait=20 dyfynbris → $0.049
# 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/maya/stream?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.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Rhedeg y cais hwn

Mae'ch allwedd yn aros yn y porwr hwn: caiff ei hanfon at Doitong API yn unig a'i chadw (localStorage) dim ond os ticiwch Cofio. Cael allwedd API

Ynglŷn â Maya · Stream

Yn troi un testun o hyd at 5000 nod yn leferydd, gyda `prompt` gofynnol sy'n disgrifio'r llais, hyd at 500 nod, a thagiau emosiwn y gellir eu mewnblannu. Mae'r opsiynau'n cynnwys `temperature`, `top_p`, `repetition_penalty`, cyfradd samplu 48 neu 24 kHz ac allbwn wav neu mp3. Yn dychwelyd sain gyda'i hyd a'i ffactor amser real.

Paramedrau

EnwMath RhagosodedigCaniateir Disgrifiad
textgofynnol
Mathstring
≤ 5,000 nod
Testun synthesis lleferydd sy'n caniatáu tagiau emosiwn ar ffurf <emotion_name> mewn unrhyw le, fel yn 'Hello world! <excited> This is amazing!' neu 'I can't believe this <sigh> happened again.'. Yr emosiynau a gefnogir yw curious, sarcastic, giggle, gulp, exhale, snort, sing, scream, cry, whisper, excited, angry, gasp, chuckle, sigh, laugh_harder, a laugh.
promptgofynnol
Mathstring
≤ 500 nod
Nodweddion llais neu gymeriad i'w disgrifio, megis dwyster, tôn, cyflymder, timbre, traw, acen ac oedran.
temperaturedewisol
Mathnumber
Rhagosodedig0.4
0 – 2
Tymheredd samplu sy'n rheoli amrywiad sain: mae ei gynyddu'n cyflwyno mwy o amrywiaeth, tra bod yr ystod is o 0.2–0.5 yn ffafrio sefydlogrwydd a chysondeb.
top_pdewisol
Mathnumber
Rhagosodedig0.9
0 – 1
Gosodiad samplu niwclews sy'n addasu amrywiaeth dewis tocynnau.
max_tokensdewisol
Mathinteger
Rhagosodedig2000
28 – 4,000
Cyllideb tocynnau SNAC sy'n cyfyngu ar hyd y sain, wedi'i chyfrifo fel 7 tocyn ar gyfer pob ffrâm.
repetition_penaltydewisol
Mathnumber
Rhagosodedig1.1
1 – 2
Cosb a gymhwysir i ailadrodd tocynnau. Mae ei chynyddu'n lleihau arteffactau ailadrodd.
sample_ratedewisol
Mathenum
Rhagosodedig48 kHz
48 kHz24 kHz
Dewis cyfradd samplu sain rhwng prosesu cyflymach ar 24 kHz ac allbwn o ansawdd uwch ar 48 kHz.
output_formatdewisol
Mathenum
Rhagosodedigwav
wavmp3
Fformat y ffeil sain a ddefnyddir ar gyfer lleferydd wedi'i syntheseiddio.
enable_safety_checkerdewisol
Mathboolean
Rhagosodedigtrue
Gellir llacio'r sgrinio drwy osod false, ar yr amod bod y galwr wedi'i awdurdodi.
gofynnol

Allbwn

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "maya/stream",
  "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.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Eich ffeiliau, eich dewisMae pob outputs[].url yn gopi ar ein storio: wedi'i gadw am byth (telir fesul GB-mis) neu am 7 diwrnod am ddim, yn ôl gosodiad eich cyfrif neu ?storage=.
Yr un siâp ar bob modeltype, url, content_type, width, height a duration, ar gyfer delweddau, fideo a sain fel ei gilydd. Gwrthrych canlyniad y model ei hun yw output.
Meysydd yr allbwn
audio
object {url, content_type, file_name, file_size}Ffeil lleferydd a gynhyrchwyd yn WAV neu MP3, gyda sain mono ar 24 kHz neu 48 kHz yn ôl penderfyniad yr uwchsamplwr.
duration
numberHyd yr allbwn sain, wedi'i fesur mewn eiliadau.
sample_rate
stringCyfradd samplu'r allbwn sain.
generation_time
numberAmser cynhyrchu sain, wedi'i fesur mewn eiliadau.
rtf
numberFfactor amser real wedi'i gyfrifo fel generation_time wedi'i rannu â audio_duration; mae gwerthoedd llai'n dangos perfformiad gwell.

Mwy o fodelau: Testun i Leferydd

Ar gyfer asiantau AI: mae'r dudalen hon fel Markdown ar gael yn https://doitong.com/cy/developers/models/maya/stream.md. Pob model a chanllaw: https://doitong.com/developers/llms.txt