Text-to-speech (TTS)

Text-to-speech (TTS) is technology that converts written text into synthetic spoken audio. A TTS system analyzes words, pronunciation, sentence structure, and prosody, then generates a waveform in a selected voice. It performs the reverse operation of speech-to-text, which converts audio into written language rather than producing audio from text.

How text-to-speech works

Text-to-speech begins by normalizing written input. The system expands forms such as abbreviations, dates, currency, and numerals into words, then divides the text into linguistic units. A pronunciation lexicon or learned pronunciation model maps those units to sounds such as phonemes.

The synthesis stage predicts duration, pitch, emphasis, and other characteristics from that representation. Older systems joined prerecorded sound segments or generated speech with hand-built acoustic rules.

Many neural systems predict a spectrogram or another acoustic representation and use a vocoder to produce a waveform. Other architectures generate waveforms directly or predict discrete audio tokens.

Pronunciation alone does not make speech sound natural. Pauses, rhythm, stress, and intonation also affect intelligibility and meaning. The W3C's Speech Synthesis Markup Language specification defines controls for pronunciation, speaking rate, pitch, volume, pauses, and document structure when a synthesis engine supports SSML.

How text-to-speech developed

Electronic speech synthesis predates modern computers. Bell Labs engineer Homer Dudley developed the keyboard-operated Voder, which trained operators manually played at the 1939 New York World's Fair. The Smithsonian's account of the Voder describes how keys, a wrist plate, and a pedal controlled its electronic speech sounds.

The Voder was an ancestor of electronic synthesis rather than an automatic text-to-speech system.

Later systems moved from manually controlled synthesis to rule-based formant synthesis and recorded-unit concatenation. Statistical parametric models then learned average acoustic patterns from speech data. Neural sequence models and neural vocoders made it possible to generate more fluid speech with fewer audible joins, while introducing new questions about data consent and speaker identity.

Where text-to-speech is used

Text-to-speech supports screen readers, communication aids, navigation prompts, announcements, audiobook production, language learning, and spoken responses from voice assistants. Dynamic applications can produce audio for text that was not recorded in advance, which is useful when names, numbers, or messages change for each interaction.

TTS and automatic speech recognition often appear in the same voice application but solve opposite problems. A conversational system may use ASR to interpret a caller, a language model to choose a response, and TTS to speak that response. Each component has separate quality measures, latency, and pricing.

Frequently asked questions

What is the difference between text-to-speech and speech-to-text? Text-to-speech converts written text into synthetic audio, while speech-to-text converts spoken audio into written text. TTS produces a voice that a listener can hear. STT or ASR produces a transcript that a person or software system can read and analyze.

Is text-to-speech the same as voice cloning? Text-to-speech is not the same as voice cloning. Voice cloning creates or adapts a model to imitate a target speaker, and that model may drive text-to-speech or voice conversion. TTS is the broader function and may use a designed multi-speaker voice, a licensed studio voice, or a cloned target voice.

What makes text-to-speech sound natural? Natural-sounding text-to-speech depends on accurate pronunciation, timing, stress, pitch, pauses, and stable voice quality. The model must also interpret context, since identical spelling can require different pronunciations and sentence types can require different intonation. Listener tests remain important because no single acoustic metric captures naturalness.

Does text-to-speech understand the text it reads? Text-to-speech does not necessarily understand text in the human sense. A synthesis model can use linguistic context to resolve homographs, select phrasing, and control expressive delivery without reasoning about the full meaning. Systems may use a separate language model for those contextual decisions, but speech generation and language understanding remain distinct tasks.