#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →

WaveNet by DeepMind: AI Revolution in Speech Synthesis

WaveNet, published by DeepMind in September 2016, was a neural network that generated raw audio one sample at a time. It made synthetic speech sound far more natural than earlier systems and became the basis of Google Assistant and Google Cloud voices.

This article explains how it worked, with two small calculations, how it was made fast enough to deploy, and what replaced it.

WaveNet by DeepMind

What came before WaveNet

Text-to-speech (TTS) systems before 2016 used two main approaches:

  • Concatenative synthesis: stitching together small recorded pieces of a voice actor's speech. It could sound natural, but changing voice, emotion or style meant recording a new database.
  • Parametric synthesis: generating speech from a statistical model of sound parameters through a vocoder. It was flexible but sounded buzzy and robotic.

WaveNet took a different route: model the audio waveform directly.

How WaveNet works

Predict the next sample

Digital audio is a sequence of numbers (samples). The WaveNet paper worked with 16,000 samples per second. WaveNet is autoregressive: it predicts each sample from all the samples before it, then feeds that prediction back in to produce the next one. Speech is built up point by point, which lets the model capture fine details such as breathing and mouth sounds.

Turn each sample into a choice among 256 values

Raw audio samples are usually 16-bit numbers, which would mean 65,536 possible values per step. WaveNet compressed them with μ-law companding to 256 levels, then treated each step as a classification problem with a softmax output. μ-law gives more levels to quiet sounds, where human hearing is sensitive:

import math

def mu_law(x, mu=255):
    y = math.copysign(math.log1p(mu * abs(x)) / math.log1p(mu), x)
    return int((y + 1) / 2 * mu + 0.5)     # map [-1, 1] to 0..255

print([mu_law(v) for v in (-1.0, -0.01, 0.0, 0.01, 1.0)])

Output:

[0, 98, 128, 157, 255]

A tiny amplitude of 0.01 (1% of full scale) already moves about 29 levels away from silence at 128. On a linear scale it would move about one level. That is why 256 μ-law levels can represent speech well.

See far back with dilated causal convolutions

To predict a sample well, the model must "remember" a lot of past audio. WaveNet used causal convolutions (each output only looks at past inputs) with dilation: each layer skips more inputs than the last (1, 2, 4, 8 ... 512), so the receptive field grows exponentially with depth. With a kernel size of 2 and that dilation pattern repeated three times:

dilations = [2**i for i in range(10)] * 3    # 1..512, three times
kernel = 2
receptive_field = 1 + sum((kernel - 1) * d for d in dilations)
print(receptive_field, "samples =", round(receptive_field / 16000 * 1000), "ms at 16 kHz")
3070 samples = 192 ms at 16 kHz

Thirty layers can see about 0.19 seconds of audio, roughly the length of a syllable or two. The layers also use gated activations, residual connections and skip connections to train deep stacks stably.

Condition on what to say and who says it

An unconditioned WaveNet produces speech-like babble. For TTS, it was conditioned on linguistic features derived from the text (and on pitch), and could be conditioned on speaker identity, so one model could speak in multiple voices.

The results

In the paper's listening tests, people rated WaveNet speech as more natural than the best existing concatenative and parametric systems for both US English and Mandarin Chinese, closing much of the gap between synthetic and human speech. The same model, trained on piano recordings, could also generate music-like audio, showing the approach was general.

Making it fast: Parallel WaveNet

The original WaveNet was far too slow for products, because it had to run the network once for every single sample. In 2017 DeepMind introduced Parallel WaveNet, which used "probability density distillation": a trained WaveNet acts as a teacher for a student network that can generate all samples in parallel. DeepMind reported it was about 1,000 times faster than the original and could generate high-quality audio faster than real time. Google Assistant began using WaveNet voices for US English and Japanese in October 2017.

WaveNet as a vocoder

Google's Tacotron 2 (December 2017) split TTS into two stages: a sequence-to-sequence network turned text into a mel spectrogram, and a WaveNet vocoder turned the spectrogram into audio. Listeners in the paper rated its output close to professional recordings. This two-stage design shaped TTS systems for years.

Google Cloud Text-to-Speech has offered "WaveNet" voices to developers since 2018, alongside newer voice types.

What came after

  • Faster vocoders: WaveRNN, WaveGlow, MelGAN and HiFi-GAN produced similar quality with much less computation, making high-quality TTS possible on phones.
  • End-to-end and large-scale models: later systems learned more of the pipeline together and, with large datasets, can imitate a voice from a short sample, which raised serious misuse concerns. See AI voice cloning tools and their risks.
  • Ideas beyond speech: dilated causal convolutions were adopted in time-series forecasting and other sequence models, and WaveNet's autoregressive approach to audio influenced later generative audio research.

Why WaveNet still matters for learners

WaveNet is a compact lesson in several deep learning ideas at once: autoregressive generation, treating regression as classification, receptive fields, conditioning, and the trade-off between quality and inference speed. If you want to explore further, compare it with transformer-based sequence models in RNNs vs transformers, see how generative models compare in how VAEs are used in AI, and try a hands-on project such as building a voice assistant in Python.

Placed Students

Our Clients

Partners

...