Skip to content

Speech

Text in, a level WAV file out

Send text, pick a voice and a style, and get a WAV file through a job. You pay per character, and only when the job succeeds.

POST/v1/speech/tts/jobs

Sample output, not a live call
  1. 1text

    Order #8812 ships Mar 3. Total: $24.50.

  2. 2normalized text

    Order number eighty-eight twelve ships March third. Total: twenty-four dollars and fifty cents.

  3. 3phonemes

    1. AO1 R D ER0
    2. N AH1 M B ER0
    3. EY1 T IY0 EY1 T
    4. T W EH1 L V
    5. SH IH1 P S
    6. M AA1 R CH
    7. TH ER1 D
    8. T OW1 T AH0 L
    9. T W EH1 N T IY0 F AO1 R
    10. D AA1 L ER0 Z
    11. AH0 N D
    12. F IH1 F T IY0
    13. S EH1 N T S
  4. 4voice

  5. 5audio

    two sentence chunks, each at its own loudnesscrossfaded, one loudness across the file

voice, style
alto, announcement
format
wav, 16000 Hz
duration
5.9 s
characters
39

1 / 5 text

What you send, and what you are charged for. Marked: what a voice cannot read as written.

Order #8812 ships Mar 3. Total: $24.50.

Text is not ready to be spoken. Someone has to read the numbers first.

Turning text into audio at volume means handling numbers and abbreviations, splitting long text without audible seams, and keeping every file at the same loudness. Few teams want to run that stack on their own GPUs.

  • Shops and delivery apps that read order and shipping updates aloud

    Sounds likeOrder #8812 ships Mar 3. Total: $24.50.

  • Publishers producing audio versions of articles in overnight batches

    Sounds likeThe council met on Feb. 14. It approved a 2.5% rise in the 2027 budget.

  • Product teams voicing onboarding prompts and in-app announcements

    Sounds likeWelcome back. Your trial ends in 3 days, at 5 PM.

2 / 5 normalized text

Numbers, dates and currency spelled out. An inner stage: the API does not return it.

Order number eighty-eight twelve ships March third. Total: twenty-four dollars and fifty cents.

Six stages, two of them on GPUs. What runs, and what goes in and comes out.

The acoustic model and the vocoder are open models we tune and serve on our own GPUs, so a million characters costs what it costs us to run, plus a margin.

What runs for one speech job

Steps, in order:

  1. Text, voice, style (input)
  2. Text normalization (check)
  3. Phonemes and prosody (check)
  4. Voice library (store)
  5. Acoustic model (model)
  6. Neural vocoder (model)
  7. Crossfade and loudness (check)
  8. WAV through a signed link (output)

Connections:

  • Text, voice, style to Text normalization
  • Text normalization to Phonemes and prosody
  • Phonemes and prosody to Acoustic model: sentence chunks
  • Voice library to Acoustic model: voice
  • Acoustic model to Neural vocoder
  • Neural vocoder to Crossfade and loudness
  • Crossfade and loudness to WAV through a signed link
  1. 01 · normalize

    Normalize the text

    Expands numbers, dates, currencies and abbreviations into words, and detects the language when you leave the language field out.

    Runs on
    CPU worker
    Goes in
    text
    Comes out
    normalized text, language

    Rung 2: normalized text

  2. 02 · phonemize

    Plan phonemes and prosody

    Converts words to phonemes and plans pitch, pauses and pace from the style preset and the speed you set.

    Runs on
    CPU worker
    Goes in
    normalized text
    Comes out
    phonemes, prosody plan

    Rung 3: phonemes

  3. 03 · acoustic

    Render each sentence chunk

    Our non-autoregressive acoustic model renders every sentence chunk in the chosen library voice.

    Runs on
    Our GPU nodes
    Goes in
    phonemes, voice
    Comes out
    spectrogram per chunk

    Rung 4: voice

  4. 04 · vocoder

    Turn spectrograms into audio

    A neural vocoder converts each spectrogram into a waveform.

    Runs on
    Our GPU nodes
    Goes in
    spectrogram
    Comes out
    audio chunk

    Rung 5: audio

  5. 05 · join

    Join and level

    Joins the chunks with short crossfades instead of hard cuts, then normalizes loudness across the whole file.

    Runs on
    CPU worker
    Goes in
    audio chunks
    Comes out
    one waveform

    Rung 5: loudness settles

  6. 06 · deliver

    Write the file

    Encodes 16-bit PCM mono WAV, stores it privately, returns a signed link with the duration, and charges the characters.

    Runs on
    API node
    Goes in
    waveform
    Comes out
    audio_url, duration_seconds, characters

    What the job returns

Offline, between releases. How a voice gets better.

  1. 01Collect aligned text and speech recordings for each library voice
  2. 02Train the acoustic model and the vocoder on them
  3. 03Preference-tune on listener-ranked samples
  4. 04Register the new weights
  5. 05Run the weekly listening and intelligibility benchmark on a fixed external text set

Then back to step 1, with the benchmark's results

Where it stops. What it does not do.

What a job takes

text
1 to 10,000 characters
voice
alto, baritone, bass, mezzo, soprano, tenor
style
neutral, narration, conversational, announcement
speed
0.5 to 2, 1 is normal
format
wav, 16-bit PCM mono
language
Set it, or leave it out to detect it
  • Up to 10,000 characters per job. Split longer text into several jobs.
  • WAV only, 16-bit PCM mono. Other formats will be added as new values of the format field.
  • Six library voices named by vocal range. Custom voices and voice cloning are not offered in this version.
  • Audio arrives through a job as a finished file. There is no streaming endpoint in this version.

3 / 5 phonemes

What each word sounds like, with stressed sounds marked. Also inner: pitch, pauses and pace are planned from here.

  1. AO1 R D ER0
  2. N AH1 M B ER0
  3. EY1 T IY0 EY1 T
  4. T W EH1 L V
  5. SH IH1 P S
  6. M AA1 R CH
  7. TH ER1 D
  8. T OW1 T AH0 L
  9. T W EH1 N T IY0 F AO1 R
  10. D AA1 L ER0 Z
  11. AH0 N D
  12. F IH1 F T IY0
  13. S EH1 N T S

Pick a line, a voice and a style. See what each rung makes of it.

Nothing here calls the API and no audio is generated. The drawings and durations come from a fixed formula, as an illustration. The real response carries the file, its duration and the characters charged; normalized text and phonemes stay inside the job. Only the documented example is the contract's own line.

POST/v1/speech/tts/jobsSample output, not a live call
Line
Library voice
Style

text

Order #8812 ships Mar 3. Total: $24.50.

39 characters

Job

  1. queued
  2. running
  3. succeeded

Job status: succeeded

  1. normalized text

    Order number eighty-eight twelve ships March third. Total: twenty-four dollars and fifty cents.

  2. phoneme hints

    1. OrderAO1 R D ER0
    2. numberN AH1 M B ER0
    3. eighty-eightEY1 T IY0 EY1 T
    4. twelveT W EH1 L V
    5. shipsSH IH1 P S
    6. MarchM AA1 R CH
    7. third.TH ER1 D
    8. Total:T OW1 T AH0 L
    9. twenty-fourT W EH1 N T IY0 F AO1 R
    10. dollarsD AA1 L ER0 Z
    11. andAH0 N D
    12. fiftyF IH1 F T IY0
    13. cents.S EH1 N T S
  3. voice, as a spectrogram

  4. audio, drawn

duration_seconds 5.9 scharacters charged 39file wav, 16000 Hz

4 / 5 voice

The acoustic model renders each sentence chunk in the voice you picked, as a spectrogram.

One POST, then a job. No streaming: you get a finished file.

Poll the job or pass webhook_url. The same key goes in the x-api-key header on every call. Branch on error.code, never on the message.

  • POST/v1/speech/tts/jobs

    Creates a speech job and answers 202 with the job id and the path to poll.

    Answers
    Job
    Meter
    speech.characters
  • GET/v1/jobs/{id}

    Reads the job: its status, its progress, and once it succeeds the signed audio_url.

    Answers
    Sync
    Meter
    Not metered
  • POST/v1/jobs/{id}/cancel

    Cancels a queued or running job. Cancelled jobs are not charged.

    Answers
    Sync
    Meter
    Not metered

POST/v1/speech/tts/jobsReturns 202 with a job id. A retry with the same Idempotency-Key within 24 hours returns the same job.

curl -X POST "$BASE_URL/v1/speech/tts/jobs" \
  -H "x-api-key: sk_live_..." \
  -H "content-type: application/json" \
  -d '{"text": "Your order has shipped.", "voice": "alto"}'
{
  "data": {
    "job_id": "c4e6a8b0-2d4f-4a7b-9c1e-3f5a7b9d1e24",
    "status": "queued",
    "poll_url": "/v1/jobs/c4e6a8b0-2d4f-4a7b-9c1e-3f5a7b9d1e24"
  },
  "meta": {
    "request_id": "3f1c9a52-7d4e-4b8a-9e21-6c0d5b7a8f13",
    "version": "1",
    "engine": "native"
  }
}

The 202 is the contract's example. The other two are ours in the documented shape, since the contract has no succeeded speech example.

Errors you can get

  • validation_error400

    The body has an unknown field, an unknown voice, a speed outside 0.5 to 2, or text over 10,000 characters.

  • unauthorized401

    The x-api-key header is missing, wrong or revoked.

  • forbidden403

    The key or the account has no access to this resource.

  • not_entitled403

    Your plan does not include Speech.

  • quota_exceeded403

    The characters left this period do not cover the job. details holds the meter and the remaining characters.

  • not_found404

    The requested resource does not exist.

  • idempotency_conflict409

    The Idempotency-Key was used in the last 24 hours with a different body.

  • payload_too_large413

    The JSON body is over 2 MB.

  • rate_limited429

    The key sent more requests than its per-minute limit. details holds retry_after_seconds.

  • internal_error500

    Something failed on our side.

What you are billed for

Unit
characters
Counted as
Unicode code points of the text sent to speech synthesis, whitespace included.
Rounding
Counted per character. The count is checked against your remaining characters when the job is queued and charged when it succeeds. Failed and cancelled jobs are not charged.
Trial on approval
50,000 characters

Webhook

When
On a terminal state: job.succeeded, job.failed or job.cancelled
x-signature
sha256 HMAC of the timestamp, a dot and the raw body, keyed with your webhook secret
x-webhook-id
The same on every retry. Use it to drop duplicates
Answer
Any 2xx within 10 seconds. Anything else is retried with backoff

5 / 5 audio_url

One 16-bit PCM mono WAV at one loudness, through a signed link.

Prices. Per character, billed monthly by invoice.

The trial covers 50,000 characters. It is the small trial every approved account starts with.

Speech tiers, billed monthly

Starter

Price
$5/month
Included
1,000,000 characters
Limits
No extra limits
Fits
About 33,000 characters a day over a 30-day month, such as order and delivery notices for a small shop

Pro

Price
$19/month
Included
6,000,000 characters
Limits
No extra limits
Fits
About 200,000 characters a day, such as audio versions of a publication's daily articles

Scale

Price
$49/month
Included
30,000,000 characters
Limits
No extra limits
Fits
About a million characters a day, such as catalog narration or a large notification volume

Over the quota: write to us and we can raise it, or it resets next period.

All six APIs are also sold together as one bundle: $19 a month with every Starter quota, $49 with every Pro quota, $129 with every Scale quota. See the bundle on the pricing page

Before you apply. What to check first.

Which languages does it speak?

You can set the language field or leave it out and let the job detect it.

Can I stream audio while it is being generated?

Not in this version. Every request is a job that returns a finished file, which suits batch work such as articles and notifications. Live voice agents need streaming, and this API is not built for that.

Can I get MP3 or Opus instead of WAV?

Today the only format is WAV, 16-bit PCM mono. New formats will be added as new values of the format field, so code that sends wav keeps working.

How exactly are characters counted?

As Unicode code points, whitespace included: the same number [...text].length gives in JavaScript. The count is charged only when the job succeeds.

What happens to my text and the audio files?

Audio is stored privately and reached through a signed link that stops working at files_expire_at; fetch the job again for a fresh link.

Speech jobs billed per character

Send an application and we review it within 72 hours. Approved accounts get credentials and a small trial, and we send invoices by hand.

Apply for access