WaveNet

On this page 7

WaveNet is a deep autoregressive generative model of raw audio waveforms, introduced by DeepMind in 2016, that predicts each audio sample from all previous samples using stacks of dilated causal convolutions. In speech & language AI it marked the shift from concatenative and parametric speech synthesis to neural text-to-speech, and it became the template for the neural vocoder, the component that turns acoustic features into audible speech.

Within artificial intelligence, WaveNet is significant because it showed that a single network could model audio at 16,000 to 24,000 samples per second directly, without hand-designed signal processing, and still produce speech that listeners rated as markedly more natural than earlier systems.

How WaveNet generates audio sample by sample

WaveNet generates audio by factorizing the joint probability of a waveform into a product of conditional probabilities: each sample is drawn from a distribution conditioned on every sample that came before it. Generation is therefore strictly sequential, one sample per network evaluation.

The original model quantizes each sample to 256 levels using mu-law companding and treats prediction as a 256-way classification with a softmax output. This categorical output can represent multimodal distributions, which suits audio better than a single Gaussian. Later variants replaced it with a mixture of logistic distributions over 16-bit values.

Each layer uses a gated activation unit, the product of a tanh branch and a sigmoid gate, followed by residual and skip connections that let gradients flow through dozens of layers. The skip outputs of all layers are summed and passed through a small output stack that produces the next-sample distribution.

Dilated causal convolutions and the receptive field

Dilated causal convolutions give WaveNet a long memory at modest cost. A causal convolution only sees past samples, so the model never cheats by looking ahead. Dilation skips inputs with a fixed step, and doubling the dilation in each layer makes the receptive field grow exponentially with depth.

The table shows how a typical block of ten layers with kernel size 2 expands its view of the past.

LayerDilationReceptive field (samples)
112
4816
764128
105121,024
Receptive field growth in one dilation block

Repeating such blocks several times yields a receptive field of a few thousand samples, roughly a few hundred milliseconds of audio at 16 kHz. That is enough to capture pitch periods and phoneme transitions, but not enough for sentence-level prosody, which must come from conditioning inputs instead.

Conditioning WaveNet for speech synthesis

WaveNet becomes a text-to-speech system through conditioning, extra inputs that steer what audio it produces. Global conditioning supplies a fixed vector, such as a speaker identity, for the whole utterance. Local conditioning supplies a time-varying sequence that is upsampled to the audio rate.

Conditioning inputTypeTypical source
Linguistic featuresLocalPhonemes, durations and F0 from a text front end
Mel spectrogramLocalAcoustic model such as Tacotron
Speaker embeddingGlobalLearned lookup or speaker encoder
Style or emotion codeGlobalLabel or reference encoder
Conditioning inputs used with WaveNet

The original 2016 system used linguistic features. In 2017, Tacotron 2 paired a sequence-to-sequence model that predicts mel spectrograms with a WaveNet vocoder, a design that reached mean opinion scores close to recorded speech and defined the two-stage architecture still common today.

How faster vocoders overcame WaveNet latency

The main weakness of WaveNet is slow autoregressive inference: producing one second of 24 kHz audio requires 24,000 sequential network passes. Early implementations ran far slower than real time, which made production deployment impractical.

Parallel WaveNet solved this with probability density distillation: a trained autoregressive teacher supervises an inverse autoregressive flow student that generates all samples in parallel. Other work reduced cost through smaller recurrent models or different generative families.

VocoderGeneration approachSpeedMain trade-off
WaveNetAutoregressive convolutionVery slowHighest early quality, impractical latency
Parallel WaveNetDistilled flowFaster than real timeComplex two-stage training
WaveRNNCompact autoregressive RNNReal time on CPUStill sequential
WaveGlowNormalizing flowFast on GPULarge parameter count
HiFi-GANAdversarial generatorVery fastPossible GAN artifacts
WaveNet compared with later neural vocoders

Training, by contrast, was never the bottleneck. Because every target sample is already known, teacher forcing lets all positions in a training clip be computed in parallel, so a WaveNet trains efficiently on GPUs even though it samples slowly. This asymmetry between training and inference is typical of autoregressive models and explains why distillation, rather than retraining from scratch, became the first practical remedy.

Engineers also used caching of intermediate activations to avoid recomputing the dilated convolution history for every new sample. This fast generation trick reduces the cost per sample from proportional to the receptive field to proportional to the number of layers, yet it cannot remove the fundamental one-sample-at-a-time dependency.

Strengths, limitations and influence

WaveNet showed that raw waveform modeling could beat decades of hand-engineered vocoders, and its building blocks spread well beyond speech. Dilated causal convolutions reappeared in music generation, time-series forecasting and the temporal convolutional network family.

Its ideas also shaped modern neural audio codecs and speech language models, which predict discrete audio tokens autoregressively much as WaveNet predicted quantized samples, but at a far lower token rate. The practical limitations below explain why WaveNet itself is now rarely deployed in its original form.

  • Quality: natural timbre and breathing when well conditioned, but mispronunciations from the front end pass straight through.
  • Data needs: a single-speaker model typically needs tens of hours of clean, studio-quality recordings.
  • Unconditioned output: without text or spectrogram input, WaveNet produces speech-like babble with no meaning.
  • Compute: training is heavy, and naive sampling is too slow for interactive use.
  • Misconception: WaveNet is not a complete text-to-speech system by itself; it needs a text front end or an acoustic model.

A plain-language summary

Digital sound is a long list of tiny numbers. One second of speech holds thousands of them. WaveNet writes that list one number at a time. Each new number is a guess based on all the numbers before it.

It is like a pianist improvising note by note while listening closely to everything already played. Because WaveNet learned from many hours of real voices, its guesses sound remarkably human. The drawback was speed. Making each number separately took a long time, so faster methods were later built on its ideas.

An example from practice

A public transport operator wants clear, natural station announcements in two languages without recording every possible combination of line, platform and delay. Its engineering team builds a two-stage text-to-speech pipeline: an acoustic model converts announcement text into mel spectrograms, and a WaveNet-style vocoder turns those spectrograms into 24 kHz audio.

The team records about 20 hours of speech from one professional voice talent per language and trains the vocoder offline on GPUs. Because live sampling would be too slow, they pre-generate the common phrases and use a distilled parallel vocoder for rare, dynamic messages such as unexpected delays.

In listening tests with commuters, the new announcements are rated clearly more natural and easier to understand than the previous concatenated recordings, especially for long platform and delay messages.