VITS Explained: Generating Speech Waveforms from Text in One Model
Learn how VITS combines a conditional VAE, normalizing flows, monotonic alignment, a stochastic duration predictor, and waveform adversarial learning—and what its end-to-end design requires.
VITS Explained: Generating Speech Waveforms from Text in One Model
VITS (Variational Inference with adversarial learning for end-to-end Text-to-Speech) is an end-to-end TTS model that generates waveforms from text within one jointly trained system. It combines a conditional variational autoencoder (VAE), normalizing flows, and adversarial waveform training. A stochastic phoneme-duration predictor can produce different speaking rhythms for the same sentence. “One model” does not mean simple training or unconstrained inputs: phonemization, alignment, speech data, and inference settings still matter.
How it differs from two-stage TTS
A conventional two-stage system predicts a mel-spectrogram from text and uses a separate vocoder to create the waveform. VITS trains an end-to-end objective and directly generates the waveform at inference, without requiring a separately deployed mel-to-waveform module. This does not mean spectrograms are absent during training: the paper uses a linear spectrogram in the training-only posterior encoder and a mel reconstruction loss.
Main components
**Text encoder and conditional prior:** encode phonemes and predict a distribution over latent speech representations. A normalizing flow makes the prior more expressive.
**Posterior encoder (training):** encodes a linear spectrogram of real speech into a latent representation. It and the discriminator are omitted from the usual inference path.
**Monotonic Alignment Search (MAS):** because there are no ground-truth phoneme-to-frame alignments, dynamic programming finds a monotonic, non-skipping alignment during training. The alignment gives a duration for each phoneme.
**Stochastic duration predictor:** learns a distribution over durations instead of one fixed duration per phoneme. At inference, sampling can vary rhythm and speaking rate for the same text.
**Decoder and discriminator:** turn latent representations into raw waveform. In the paper, the decoder is based on the HiFi-GAN V1 generator and the discriminator follows the multi-period design.
Simplified training: real speech → posterior encoder → latent representation and phoneme alignment → decoder waveform compared with targets. Inference: phonemes → text representation and sampled durations → latent representation → waveform.
How the losses work together
The paper combines VAE reconstruction and KL losses with stochastic duration, waveform adversarial, and discriminator feature-matching losses. Together, they tie the generated signal to text and alignment conditions while encouraging realistic waveform texture. This is a system-level balance: changing a single loss or component can affect the others.
Variation and limits
Text does not uniquely determine how a sentence is spoken. Pitch, speed, and duration vary across speakers and situations. VITS uses latent uncertainty and stochastic duration sampling to model this one-to-many relationship. Variation does not automatically provide meaningful emotion control or ensure that every sample is appropriate. The paper evaluates LJ Speech (single speaker) and VCTK (109 English speakers with varied accents); those findings are tied to those data and test settings, not a guarantee for every language or speaker.
A checkpoint evaluation sequence
Check expected text preprocessing, phoneme inventory, language symbols, sample rate, and output format. Do not assume checkpoints from different implementations are interchangeable.
Save baseline outputs for varied fixed sentences. Listen separately for pronunciation errors and changes in pace or intonation.
If the implementation exposes duration or sampling-noise controls, change one setting at a time on the same sentences. Follow the checkpoint documentation for each setting’s meaning and valid range.
For missing, repeated, or reordered words, inspect text normalization and learned alignment. For unusually short or long speech, inspect duration prediction and inference settings.
For multispeaker checkpoints, verify speaker conditioning and whether training speakers cover the target. Do not generalize single-speaker quality results to unseen voices.
VITS’s central benefit is joint text-to-waveform training with a probabilistic representation of speaking variation. In return, alignment, preprocessing, and several training components must work together. Check the implementation and checkpoint conditions instead of inferring capabilities from the VITS name alone.
References
[Kim, Kong & Son (2021), Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech](https://proceedings.mlr.press/v139/kim21f.html)
[Official paper implementation](https://github.com/jaywalnut310/vits)