ForHosting KIT · Audio & Voice

SSML text to speech

Your SSML is accepted as is and read aloud naturally, but know the limit: a two-second break tag does not hold for two seconds, and emphasis tags do not stress a word harder. The result sounds the same as plain text.

● BetaPer request + per 1,000 characters$0.002
Use it from WebAPIEmailTelegramApp soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

Be clear on the boundary up front: this engine renders the words, not the fine-grained acoustic controls SSML can describe.

What SSML is and why it exists

Speech Synthesis Markup Language is a W3C standard built so a writer can describe how a voice engine should say something, not just what to say: where to pause, which syllable to stress, how to pronounce an acronym, whether a string of digits is a date, a phone number or a plain quantity.

It has been the industry convention for controlling synthesized speech for years, precisely because plain text is genuinely ambiguous — '2/3' can be a date, a fraction or a score, and only markup resolves that in the abstract.

What you send and what you get back

The service extracts the spoken words from the markup and synthesizes them; the tags themselves are stripped to their text before synthesis. Because the words are what gets synthesized, submitting SSML and submitting the equivalent plain text produce the same natural narration — the markup is accepted for compatibility, not because each tag changes the sound.

What this engine does and does not render

This is the honest boundary, stated so nothing on this page oversells it. The current voice engine reads the text content and produces natural, well-paced speech. It does not acoustically apply the fine-grained SSML controls: emphasis, phoneme pronunciation, prosody and exact break durations are accepted in the input and then stripped, not rendered.

So a two-second break tag does not hold the line for two seconds, and an emphasis tag does not stress that word harder than the model would on its own.

Fitting it into automated content

SSML is just structured text, so it is easy to generate programmatically — a content pipeline can wrap numbers in tags, insert breaks between sections, or mark up a name with a phonetic hint, all without human intervention. Pricing reflects the light, targeted nature of the task — a small per-request base plus a per-1000-character rate on the submitted text, with failed tasks never billed after automatic retries.

Narration from generated scripts

Turn algorithmically generated scripts into natural-sounding spoken audio as one automated step in a content pipeline.

Long-form text to audio

Convert articles, notes or documentation into audio for listeners who prefer to hear content rather than read it.

Multilingual voice output

Produce spoken audio across the supported languages from the same request shape, driven by the language field.

Does it render emphasis, phoneme and prosody tags?

No — not on the current voice engine. Those tags, along with exact break durations, are accepted in the input and then stripped to their text; the audio reads the words naturally rather than applying the marked emphasis, pronunciation or pauses. Precise acoustic rendering of those controls is not available yet.

Do I need SSML for basic text to speech?

Both plain text and SSML input come out as natural speech here.

Can I use it to control the pronunciation of names or acronyms?

Not acoustically — phoneme control is not rendered on this engine, so a phoneme tag will not force a specific pronunciation. If a name must be said a particular way, spell it phonetically in the text itself so the words carry the pronunciation.

Will a two-second pause in my markup be respected?

No. Pause tags are accepted but reduced to their text before the voice is generated, so a two-second break does not hold the line for two seconds. The voice still uses its own natural pacing between sentences.

Why send marked-up text if the tags are not rendered?

Because your process can keep sending the text it already produces. You avoid building and maintaining a second path that strips the markup down to plain text, and the narration sounds the same as with plain text.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/voice/tts-ssml

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/voice/tts-ssml \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ssml":"<speak>Hola <break time=\"500ms\"/> mundo.</speak>"}'
{
  "ssml": "<speak>Hola <break time=\"500ms\"/> mundo.</speak>"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "voice.tts_ssml",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002
Per 1,000 characters$0.0025

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb200
max_minutes180
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

This text to speech endpoint accepts the SSML-tagged text your pipeline already produces, as well as plain text. It reads the spoken words out of the markup and synthesizes them into natural-sounding audio, so an existing SSML workflow can point at it without first stripping tags back to plain text.

What SSML is and why it exists

That is the format this endpoint accepts on input; what it does with each tag is described plainly in the next section.

How the request and response work

You submit SSML-tagged text (or plain text) in the request body. The task is queued asynchronously and returns a task_id immediately; the rendered audio is delivered afterward via a signed webhook or a signed link valid for 24 hours.

What this engine does and does not render

If your use depends on those controls being rendered precisely, that capability is not available on this engine yet — this endpoint exists so an SSML pipeline can produce audio today without a separate plain-text branch.

Fitting it into automated content

The value of this endpoint for that audience is that it accepts the SSML they already emit as-is: they do not have to build and maintain a second code path that strips their markup down to plain text before sending it.

Access and how results are handled

This endpoint requires prepaid balance like every other one in the API; a request without balance returns HTTP 402 rather than a partial or degraded result. Submitted text and generated audio are removed after the retention period and are never used to train models — delivery is strictly through your webhook or a temporary signed link, and nothing is kept beyond that window.

Drop-in for an existing SSML pipeline

Point a workflow that already emits SSML at this endpoint and get spoken audio back without writing your own step to strip the tags to plain text first.

What is SSML and how does this text to speech API use it?

SSML is a markup standard for describing speech synthesis. This endpoint accepts SSML-tagged text, reads the spoken words out of the markup, and synthesizes them into natural audio. It accepts the format for compatibility; see the next answer for which SSML controls are actually rendered.

Is this text to speech API free?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

How much does it cost?

It costs $0.002 per request plus $0.0025 per 1000 characters of submitted text.

How do I get the generated audio?

The task runs asynchronously and returns a task_id immediately; the finished audio is delivered via a signed webhook or a signed link valid for 24 hours.

What happens if my SSML markup is invalid?

Because the markup is reduced to its spoken text before synthesis, malformed tags do not fail the request — you still get audio of the readable words. Nothing is rejected for a tag being wrong, so don't rely on this endpoint to validate your SSML.

Read the full KIT documentation →