Scrub API
POST/v1/tools/text_to_speechpriced

Text to speech

Generates speech from text, turning text into speech (text to speech, TTS): the words read aloud as one audio file, such as a voiceover or narration, in a chosen voice and accent, male or female, from soft to firm, as one take.

Takes text (text). Returns speech (the text spoken, as one file).

$0.01 per 12 seconds of speech, up to 3600 seconds.

Fields

FieldTypeDefaultWhat it is
textstringRequiredWhat is said, exactly as written, as one take; any language. Written first in brackets, [calm, slow], how it is said, never read out; (pause) or (pause 2s), a pause there.
voiceone ofKoreWho says it. Achernar: soft, female Achird: friendly, male Algenib: gravelly, male Algieba: smooth, male Alnilam: firm, male Aoede: breezy, female Autonoe: bright, female Callirrhoe: easy-going, female Charon: informative, male Despina: smooth, female Enceladus: breathy, male Erinome: clear, female Fenrir: excitable, male Gacrux: mature, female Iapetus: clear, male Kore: firm, female Laomedeia: upbeat, female Leda: youthful, female Orus: firm, male Pulcherrima: forward, female Puck: upbeat, male Rasalgethi: informative, male Sadachbia: lively, male Sadaltager: knowledgeable, male Schedar: even, male Sulafat: warm, female Umbriel: easy-going, male Vindemiatrix: gentle, female Zephyr: bright, female Zubenelgenubi: casual, male
AchernarAchirdAlgenibAlgiebaAlnilamAoedeAutonoeCallirrhoeCharonDespinaEnceladusErinomeFenrirGacruxIapetusKoreLaomedeiaLedaOrusPulcherrimaPuckRasalgethiSadachbiaSadaltagerSchedarSulafatUmbrielVindemiatrixZephyrZubenelgenubi
howstringHow the words are said, in your own words, such as calm and slow; never read out. Empty, as the voice says them.
voice_likestringWhat the voice should sound like, in the person's words, such as a calm man, when no voice is named. The voices recommended follow it; it is never read out.
accentone ofnoneThe accent it is said in, with any voice; the voice's own when none is chosen. none: the voice as it speaks, no accent asked for
nonescottishirishwelshbritishamericanaustralian

Call it

Request

curl -X POST https://app.scrub.app/v1/tools/text_to_speech \
  -H "Authorization: Bearer $SCRUB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"…"}'

Answer

{
  "ok": true,
  "result": {
    "job_id": "job_…",
    "status": "running",
    "price_usd": "$…"
  }
}

It starts at once and answers running. Ask job_status with the job_id for its result. quote gives its price first, free.

Every call can also answer an error: what comes back. Try it with your key from Account.