What is a text-to-speech API?

A text-to-speech (TTS) API converts written text into spoken audio. You send the text, a voice and settings such as language and speed, and the API returns an audio file, or streams the audio so playback can start before the whole passage is ready.

Model types

What a text-to-speech API does

A text-to-speech (TTS) API reads text aloud in a synthetic voice. You send the words to speak and choose a voice, and the model returns audio in a format such as MP3 or WAV. Depending on the model, you can also direct the delivery in plain language, for example speak slowly in a warm, calm tone, add inline tags for effects such as laughter or a sigh, write a dialogue for two or more speakers, or clone a voice from a short recording of the speaker.

Most models also take settings such as language, speaking speed and sample rate. Some add pronunciation overrides for names and acronyms, or word-level timestamps you can use for captions and highlighting.

How a request works

For a finished file, send POST /v1/audio/speech with the model ID, the text in input and a voice. The response holds a URL to the audio file by default. It can also return the audio as base64 data, or as the audio bytes themselves when the request's Accept header asks for audio. On models that offer a voice list, GET /v1/voices with the model ID returns the voices you can use.

For interactive use, models that support streaming answer on POST /v1/audio/speech:stream. The audio arrives as Server-Sent Events while the model synthesizes it, so playback can start before the whole passage is ready. A few models also accept text over the realtime voice WebSocket and speak it while the text is still arriving, for example while a language model writes its reply.

What text-to-speech is used for

  • Voice agents and assistants. Spoken replies with a short delay, using streaming output.
  • Narration. Voiceovers for videos, explainers, product tours and e-learning.
  • Long-form audio. Audiobooks, articles read aloud and podcast-style dialogue between several voices.
  • Accessibility. Interface text and documents read aloud for people who prefer to listen.
  • Localization. The same script in many languages, on models that keep one voice across languages.

What to compare between voice models

  • Naturalness. Listen to the same script in each candidate, including numbers, names and questions.
  • Voices and languages. The size of the voice library, the languages and accents, and whether you can clone a voice.
  • Latency. For conversation, check streaming support and how quickly the first audio arrives.
  • Control. Delivery instructions, emotion tags, speed and pitch, pronunciation overrides and multi-speaker dialogue.
  • Output. Audio formats, sample rates and timestamps for captions.
  • Price. TTS models bill by the amount of text: per character on some models, and per token on others, where the input text and the generated audio have separate rates. Some set a minimum number of characters per request. Longer scripts cost more.

Side-by-side model comparisons show two voice models' capabilities and rates together.

Try and call a TTS model on EmpirioLabs AI

Browse the audio models and listen to voices in the Playground before you write code. To call a model, create an API key in the dashboard and send text to https://api.empiriolabs.ai/v1/audio/speech, or to the streaming endpoint for live playback. The speech reference and the streaming speech reference describe every field.

Pay as you go, or choose a plan with weekly allowances. Current rates for every voice model are on the pricing page.

The models on EmpirioLabs AI

17 models, cheapest first where they share a billing unit. Each model's page has its full rate card, parameters and code.

Endpoints

POST /v1/audio/speech POST /v1/audio/speech:stream GET /v1/voices WEBSOCKET /v1/realtime

Priced by characters of text

ModelLowest rateApplies to
TTS 2 Flash Inworld$15.00$10.50 per 1M charactersSynthesis
StepAudio 3 TTS StepFun$0.14 per 10,000 charactersSynthesis
Qwen Audio 3.0 TTS Alibaba Cloud$0.15 per 10,000 charactersFlash synthesis
SoulX Podcast Soul AI Lab$0.015 per 1k characters, minimum 700 characters per requestBase
TTS 1.5 Mini Inworld$25.00$17.50 per 1M charactersSynthesis
TTS 2 Inworld$25.00$22.00 per 1M charactersSynthesis
TTS 1.5 Max Inworld$35.00$29.75 per 1M charactersSynthesis
Qwen Audio 3.1 TTS Plus Alibaba Cloud$0.60 per 10,000 charactersSynthesis
StepAudio 2.5 TTS StepFun$0.85 per 10,000 charactersSynthesis
GLM TTS Z.ai$0.20 per 1k characters, minimum 50 characters per requestFast (INT8)

Also available: Gemini 2.5 Flash TTS, Gemini 2.5 Pro TTS, Gemini 3.1 Flash TTS, Gemini 3.8 Flash TTS, Gemini 3.8 Flash-Lite TTS, Qwen Audio 3.1 TTS, Qwen Audio 3.1 TTS Next

Frequently asked questions

What is the difference between text-to-speech and speech-to-text?

Text-to-speech turns written text into spoken audio. Speech-to-text does the reverse: it transcribes spoken audio into written text.

Can a text-to-speech API clone a voice?

Some models can. You provide a short, clean recording of the voice, and on some models a recording of the speaker giving consent, and the model speaks new text in that voice.

How is text-to-speech priced?

By the amount of text: per character on some models and per token on others, so longer scripts cost more. On EmpirioLabs AI you can pay as you go or choose a plan with weekly allowances.

What is streaming text-to-speech?

Streaming returns the audio in small chunks while the model synthesizes it, so playback starts before the full passage is ready. It suits voice agents and other live conversations.

Ready to use better endpoints?

Check out our pricing or reach out if you want your own model deployed on our stack.