Text to Speech
Course overview
Text to Speech (TTS) turns text into audible speech. In engineering terms, it is not merely “choosing a voice for a sentence”: input needs normalization, pronunciation and prosody must be controllable, streaming playback must manage latency, voices need authorization, and output must be associated with source_revision, voice-catalog/policy version, purpose, access scope, generation configuration, and release status.
This course introduces text normalization, phonemes, prosody, acoustic representations, vocoders, and end-to-end models before moving to SSML, service engineering, evaluation, and voice-cloning risk. Dynamic material was checked on 2026-07-22. Vendors support different SSML subsets, so confirm a target version’s official documentation and contract for its voices, parameters, upload/streaming behavior, and permissions.
Where this fits in the overall path
Text to speech is in the Extended applications and complex collaboration stage. It is the output channel for a voice agent, usually after Agent Core or Workflow Automation. Together with Speech Recognition, it forms the input/output modules; Real-Time Multimodal Interaction then handles turns, barge-in, low-latency transport, and session recovery.
flowchart LR A[Source text\nsource_revision] --> B[Text normalization\nnormalization_revision] B --> C[Synthesis-plan gate\nvoice/language/purpose/ACL references] C --> D[Controlled synthesis] D --> E[Audio asset\nformat, configuration, release_id] E --> F[Playback/distribution] G[Authorization, disclosure, and revocation policy] -. constrains .-> C G -. constrains .-> F
“Plan valid,” “generated,” “playable,” “released,” and “revoked” are distinct states. An offline plan’s acl_reference stores only a reference to the object awaiting authorization; the external identity/authorization system must decide object-level ACL again before generation, reading, and release. In particular, a voice that has already played cannot be “recalled”: cancellation can only stop later generation or transport. See Real-Time Multimodal Interaction for real-time turns, interruption, and tool gates.
Learning objectives
- Explain the roles of text normalization, phonemes, prosody, acoustic representation, and a vocoder.
- Use stable SSML concepts to control language, phrasing, pauses, emphasis, and pronunciation, while handling dialect differences.
- Design contracts for voice selection, batch work, streaming, and caching that state container, codec, sample rate, channels, and player compatibility.
- Organize naturalness, intelligibility, content-correctness, stability, and preference evaluations.
- Establish voice authorization, cloning limits, disclosure, provenance records, revocation, and abuse-response processes.
- Complete an offline project that only creates and validates synthesis plans and SSML; it never produces audio.
Prerequisites
- Python Fundamentals, JSON, and API are recommended.
- No linguistics or signal-processing background is required; new terms receive an intuitive introduction.
Recommended order
- The TTS pipeline and text normalization: turn source text into a speakable form.
- Phonemes, prosody, and vocoder intuition: understand the responsibilities inside a synthesis system.
- Data and voice authorization: establish rights boundaries before collecting data or selecting a voice.
- SSML and pronunciation control: express pauses, emphasis, and readings safely.
- Voice selection, batch processing, and streaming: build a reliable output service.
- Quality, intelligibility, latency, and evaluation: validate experience with subjective and objective measures.
- Cloning risk, disclosure, and traceability: establish authorization and incident response.
- Project: an offline synthesis plan and SSML: create and validate a plan without audio.
Hands-on entry point
- Main project: Offline synthesis plan and SSML.
- Project assets: plan builder, synthesis-request fixture, and contract and CLI regression tests.
- The project uses only the Python 3 standard library. Its output explicitly uses
not_generated; it calls no TTS service and by default does not echo source text or complete SSML to the terminal.
Mastery criteria
- I can distinguish text normalization, pronunciation modeling, acoustic representation, and a vocoder.
- I can explain how phonemes, stress, intonation, rhythm, and pauses affect intelligibility.
- I can construct valid basic SSML and identify portability risks in vendor extensions.
- I can design time-to-first-audio, real-time factor, content-correctness, and human-listening tests.
- I can demonstrate that a voice and its training/reference data have explicit authorization, purpose limits, and a revocation process.
- I can run the offline project and verify its plan, SSML, provenance fields, and no-audio boundary.
Connections to other knowledge bases
- Conversational input comes from Speech Recognition; text and tone context come from Context Engineering.
- For canceling old audio on interruption, associating tool results, and recovering a session, see Real-Time Multimodal Interaction.
- Multimedia composition and synchronization connect to Multimodal AI and Video Generation.
- Abuse, privacy, and organizational responsibility connect to AI Safety, AI Governance, and Privacy Computing.
Primary references
The following sources were checked on 2026-07-22:
- W3C Speech Synthesis Markup Language 1.1 Recommendation (W3C Recommendation, 2010-09-07; still the current entry point to the specification when checked)
- W3C Pronunciation Lexicon Specification 1.0 (W3C Recommendation)
- OpenAI Text to speech guide (current product snapshot of one vendor’s streaming capabilities and AI-voice disclosure requirements; it does not establish a general API or rights conclusion for this course)
- Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions (Tacotron 2)
- FastSpeech 2: Fast and High-Quality End-to-End Text to Speech
- Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech (VITS)
- ITU-T P.800: entry point for subjective quality-evaluation methods
- NIST AI RMF Generative AI Profile (NIST AI 600-1) (published 2024-07-26; page updated 2026-04-08)
Portability and authorization
W3C specifications define semantics, but engines can implement only a subset or add private extensions. “Available” in a voice catalog does not mean usable for every scenario; technical availability, actual authorization, consent, portrait/voiceprint and related rights, and content disclosure must be checked separately. Voice similarity, catalog presence, or an authorization reference in a plan cannot independently prove permission.