Tacotron 2 is a sequence-to-sequence neural network architecture that directly converts a sequence of characters into a mel-spectrogram, an intermediate acoustic representation optimized for human auditory perception. This first stage uses an encoder-attention-decoder mechanism to predict the spectral features of speech, capturing linguistic content and coarse prosody. The predicted mel-spectrogram is then passed to a WaveNet vocoder, a separate deep autoregressive model that synthesizes the final, high-quality raw audio waveform.
Glossary
Tacotron 2

What is Tacotron 2?
Tacotron 2 is a neural text-to-speech (TTS) architecture that generates high-fidelity, natural-sounding speech from text.
The system's quality stems from its two-stage, modular design, separating linguistic modeling from waveform generation. This division allows each component to be optimized independently. Tacotron 2 set a new benchmark for speech synthesis naturalness, as measured by Mean Opinion Score (MOS), and its core design principles heavily influenced subsequent non-autoregressive models like FastSpeech 2 and modern diffusion-based audio synthesis systems.
Key Features of Tacotron 2
Tacotron 2 is a neural text-to-speech architecture that combines a sequence-to-sequence mel-spectrogram predictor with a WaveNet vocoder for high-quality speech synthesis. Its design represents a significant leap in fidelity and naturalness over previous concatenative and parametric systems.
Sequence-to-Sequence Mel-Spectrogram Predictor
The first stage of Tacotron 2 is a sequence-to-sequence model with an attention mechanism that predicts a sequence of mel-spectrogram frames from an input sequence of characters or phonemes.
- Encoder: A stack of convolutional layers followed by a bidirectional LSTM converts the text into a hidden feature representation.
- Location-Sensitive Attention: This mechanism aligns the encoder states with the target mel-spectrogram frames, allowing the model to learn which parts of the text correspond to which parts of the audio.
- Decoder: An autoregressive LSTM predicts one mel-spectrogram frame at a time, conditioned on the previous frame and the attended encoder context.
This architecture enables the model to learn complex, long-range dependencies between text and acoustic features, producing highly natural prosody.
WaveNet Vocoder Backend
Instead of using a traditional signal processing vocoder (like Griffin-Lim), Tacotron 2 employs a modified WaveNet as a neural vocoder to generate the final time-domain waveform.
- Input Conditioning: The predicted mel-spectrograms from the first stage are used to condition the WaveNet, guiding it to generate the corresponding raw audio samples.
- Autoregressive Generation: WaveNet generates audio sample-by-sample, with each new sample's probability distribution conditioned on all previously generated samples, capturing fine-grained waveform details.
- Dilated Causal Convolutions: These allow the model to have a very large receptive field, enabling it to model long-term dependencies in audio crucial for natural-sounding speech.
This combination results in audio quality that approaches human-recorded speech, with reduced buzziness and artifacts common in older systems.
Two-Stage, Modular Training
Tacotron 2 is trained in two separate, independent stages, which simplifies the training process and improves stability.
- Stage 1: Spectrogram Prediction: The sequence-to-sequence model is trained using a simple L1 loss between its predicted and ground-truth mel-spectrograms. This stage learns the mapping from text to acoustic features.
- Stage 2: Vocoder Training: The WaveNet vocoder is trained separately to maximize the likelihood of real waveform samples, conditioned on their corresponding ground-truth mel-spectrograms. This teaches it to invert the mel-spectrogram representation back into high-fidelity audio.
- Inference Coupling: During inference, the two trained components are connected: the first stage's output is fed directly into the second. This modularity allows for potential component swapping (e.g., using a different, faster vocoder like HiFi-GAN).
Character-Level Input Processing
Tacotron 2 operates directly on raw character sequences, eliminating the need for a separate, complex front-end text normalization system or linguistic feature extractor.
- Embedding Layer: An initial embedding layer converts the input characters into continuous vectors.
- Convolutional Pre-Net: A small stack of convolutional layers processes these embeddings, capturing local patterns like n-grams and simple phonemic context before the encoder LSTM.
- Implicit Learning: The model learns grapheme-to-phoneme relationships, punctuation effects, and prosodic patterns directly from data. For example, it learns that a question mark often implies a rising intonation.
This end-to-end approach simplifies the pipeline and improves robustness across different languages and writing styles.
High-Fidelity Output & Natural Prosody
The primary achievement of Tacotron 2 was producing speech with unprecedented naturalness and audio fidelity, as measured by subjective Mean Opinion Score (MOS) tests.
- Prosody: The combination of the attention-based decoder and autoregressive WaveNet captures the nuanced rhythm, stress, and intonation of human speech far better than previous parametric TTS models.
- Spectral Detail: The WaveNet vocoder generates waveforms with rich harmonic structure and crisp consonants, avoiding the muffled or metallic sound of traditional vocoders.
- Benchmark Performance: In initial evaluations, Tacotron 2 achieved a MOS close to that of professional studio recordings, significantly outperforming its predecessor, Tacotron, and contemporary parametric systems.
This quality established a new standard for neural TTS and directly influenced all subsequent architectures.
Limitations & Evolutionary Context
While groundbreaking, Tacotron 2 has inherent limitations that motivated further research, placing it in a clear evolutionary context.
- Inference Speed: The autoregressive nature of both its decoder and WaveNet vocoder makes generation slow, as outputs must be produced sequentially.
- Controllability: Prosodic features like pitch and speaking rate are learned implicitly but are not easily disentangled for fine-grained, explicit control during synthesis.
- Robustness: The attention mechanism can sometimes produce alignment failures (repetitions or skips) on unusual or out-of-distribution text inputs.
These limitations led to the development of non-autoregressive models like FastSpeech 2 (for parallel spectrogram prediction) and GAN-based vocoders like HiFi-GAN (for parallel waveform generation), which trade some initial quality for massive speed improvements.
How Tacotron 2 Works
Tacotron 2 is a neural text-to-speech (TTS) system that synthesizes high-fidelity, natural-sounding speech by combining a sequence-to-sequence mel-spectrogram predictor with a WaveNet neural vocoder.
The system operates in two sequential stages. First, an encoder-decoder with attention model processes a sequence of input characters to predict a sequence of mel-spectrogram frames, an intermediate acoustic representation. This spectrogram predictor uses a recurrent neural network (RNN) decoder with location-sensitive attention to align text and audio sequences, explicitly modeling prosody like duration and pitch. The architecture is trained directly on text-audio pairs, learning to generate accurate spectrograms from text.
In the second stage, the predicted mel-spectrogram is converted into a raw audio waveform by a modified WaveNet vocoder, acting as a neural inverse short-time Fourier transform. This autoregressive model generates high-fidelity, 24 kHz speech by predicting each audio sample based on the mel-spectrogram and previously generated samples. The separation of tasks—spectrogram prediction and waveform generation—allows for efficient, high-quality synthesis, making Tacotron 2 a foundational model for modern neural TTS and voice cloning systems.
Tacotron 2 vs. Other TTS Architectures
A technical comparison of the Tacotron 2 neural text-to-speech architecture against other prominent TTS model families, highlighting core architectural differences, performance characteristics, and practical deployment considerations.
| Architectural Feature / Metric | Tacotron 2 | Autoregressive Models (e.g., WaveNet, Original Tacotron) | Non-Autoregressive Models (e.g., FastSpeech 2, Glow-TTS) |
|---|---|---|---|
Core Synthesis Paradigm | Two-Stage: Seq2Seq Mel-Spectrogram Predictor + Neural Vocoder (WaveNet) | Fully Autoregressive: Generates output sequentially, token-by-token or sample-by-sample | Parallel: Generates entire output sequence in a single, non-sequential pass |
Primary Vocoder | WaveNet (Autoregressive) | Often integrated or same as synthesis model (e.g., WaveNet) | Neural Vocoder (e.g., HiFi-GAN, MelGAN, Diffusion-based) |
Inference Speed | Moderate (Sequential mel prediction, then sequential WaveNet generation) | Very Slow (Sequential generation at audio sample rate) | Very Fast (Parallel mel prediction, then fast parallel vocoder) |
Controllability of Speech Attributes (Pitch, Duration, Energy) | Implicit/Limited: Controlled indirectly via attention and training data | Implicit/Limited: Learned from data without explicit control mechanisms | Explicit/High: Uses separate, deterministic variance predictors for fine-grained control |
Training Stability & Complexity | Moderate: Requires careful tuning of two separate models; attention alignment can be unstable | High: Prone to exposure bias and attention failures; complex to train | Low: More stable training due to parallel generation and explicit duration modeling |
Output Audio Fidelity (Typical MOS) | High (4.0+): Pioneered near-human quality with WaveNet vocoder | High (4.0+): Can achieve very high fidelity due to sequential refinement | High to Very High (3.8-4.2): Modern parallel vocoders (HiFi-GAN) match or exceed autoregressive quality |
Speaker Adaptation & Voice Cloning | Good: Requires fine-tuning or use of a speaker encoder for few-shot adaptation | Good: Can be adapted but often requires significant retraining | Excellent: Architecture is well-suited for quick adaptation and zero-shot voice cloning |
Real-Time Factor (RTF) on GPU | ~0.3 - 0.5 (Slower than real-time) |
| < 0.05 (Faster than real-time) |
Frequently Asked Questions
A deep dive into the neural architecture that set a new standard for high-fidelity, neural text-to-speech synthesis.
Tacotron 2 is a neural text-to-speech (TTS) architecture that generates high-fidelity, natural-sounding speech by combining a sequence-to-sequence model for predicting mel-spectrograms with a WaveNet vocoder for waveform synthesis. Its operation is a two-stage pipeline: first, an encoder-attention-decoder network processes input text characters to produce a sequence of mel-spectrogram frames, which are low-dimensional audio features; second, a modified, conditioned WaveNet model acts as a neural vocoder to generate the final time-domain audio waveform from those predicted spectrograms. This separation of linguistic feature prediction and high-fidelity waveform generation was key to its quality, leveraging the strengths of both autoregressive and attention-based models.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Tacotron 2 is a foundational architecture in modern neural text-to-speech. Understanding its components and the ecosystem of related technologies is crucial for engineers building high-fidelity speech synthesis systems.
Mel-Spectrogram
A mel-spectrogram is a time-frequency representation of an audio signal where the frequency axis is warped to the mel scale, which approximates human auditory perception. It is the primary intermediate acoustic feature used by Tacotron 2's sequence-to-sequence predictor.
- Purpose: Serves as a compressed, perceptually-relevant target for the first stage of a two-stage TTS pipeline.
- Calculation: Derived by applying a Short-Time Fourier Transform (STFT), then mapping the frequencies to the mel scale using a filter bank.
- Role in Tacotron 2: The model's encoder-attention-decoder network predicts a sequence of mel-spectrogram frames from input text. This representation is then fed to the WaveNet vocoder.
Neural Vocoder
A neural vocoder is a deep learning model that generates raw audio waveforms from intermediate acoustic representations like mel-spectrograms. Tacotron 2 uses a WaveNet vocoder for this final synthesis step.
- Core Function: Converts low-frequency, frame-based features (e.g., 80-band mel-spectrograms at ~12.5 ms frames) into high-frequency audio samples (e.g., 24 kHz waveform).
- Architectures: Includes autoregressive models (WaveNet), Generative Adversarial Networks (HiFi-GAN), and diffusion-based models (WaveGrad, DiffWave).
- Impact: The shift to neural vocoders from traditional signal-processing methods (like Griffin-Lim) was the single largest factor in achieving human-like speech quality in systems like Tacotron 2.
WaveNet
WaveNet is a deep autoregressive neural network architecture for generating high-fidelity raw audio waveforms, developed by DeepMind. It serves as the vocoder in the original Tacotron 2 paper.
- Mechanism: Models the conditional probability of each audio sample given all previous samples and a conditioning mel-spectrogram, using dilated causal convolutions.
- Key Innovation: Its dilated convolutions provide an exponentially large receptive field, allowing it to capture long-range dependencies in audio crucial for coherence and naturalness.
- Limitation & Evolution: Its autoregressive nature makes it computationally slow for inference. This led to the development of parallel alternatives like HiFi-GAN and Parallel WaveNet.
FastSpeech 2
FastSpeech 2 is a non-autoregressive text-to-speech model that generates mel-spectrograms in parallel, addressing key speed and controllability limitations of autoregressive models like Tacotron 2.
- Core Contrast to Tacotron 2: Eliminates the sequential decoder, enabling parallel mel-spectrogram generation for vastly faster inference.
- Explicit Variance Prediction: Uses separate predictors for pitch, energy, and duration (prosodic features), providing finer-grained, more stable control over speech characteristics than Tacotron 2's implicit learning.
- Trade-off: While faster and more controllable, later iterations of FastSpeech often require a separately trained model (like a GAN) to achieve the same peak audio quality as the Tacotron 2 + WaveNet combination.
Prosody Modeling
Prosody modeling is the computational task of predicting and controlling the rhythm, stress, and intonation of synthesized speech. Tacotron 2 learns prosody implicitly from data via its attention mechanism.
- Elements: Includes duration (phone and word timing), pitch (fundamental frequency contour), and energy (loudness or amplitude).
- Challenge in Tacotron 2: Prosody is entangled in the decoder's latent states, making targeted control difficult. Instability in the attention mechanism can also lead to mispronunciations or erratic rhythm.
- Modern Approach: Subsequent models like FastSpeech 2 and VITS disentangle prosody by using explicit, externally predicted variance features (pitch, energy, duration) as additional inputs to the decoder.
HiFi-GAN
HiFi-GAN is a generative adversarial network-based neural vocoder designed for efficient and high-fidelity waveform generation from mel-spectrograms. It is a modern, faster successor to the WaveNet vocoder used in Tacotron 2.
- Architecture: Uses a generator with transposed convolutions and multiple discriminators (Multi-Scale and Multi-Period Discriminators) to assess audio quality at different scales.
- Advantages over WaveNet:
- Non-autoregressive: Generates the entire waveform in parallel, enabling real-time synthesis on a single GPU.
- High Quality: Achieves Mean Opinion Scores (MOS) comparable to or exceeding autoregressive vocoders.
- Practical Use: Often used as a drop-in replacement for WaveNet in Tacotron 2-style systems to dramatically improve inference speed.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us