ApX logoApX logo
ModelsCalculatorHardwareCoursesPricing
ApX logoApX logo
ModelsCalculatorHardwareCoursesPricing

All Courses

Advanced Speech Recognition and Synthesis
Chapter 1: Foundations of Modern Speech Processing Pipelines
Advanced Audio Feature Extraction
Statistical Modeling Review for Speech
Deep Learning Architectures for Sequences
Components of ASR Systems
Components of TTS Systems
Evaluation Metrics Revisited
Chapter 2: Advanced Acoustic Modeling for ASR
Hybrid HMM-DNN Systems
Connectionist Temporal Classification (CTC)
Attention-Based Encoder-Decoder Models
RNN Transducer (RNN-T)
Transformer Architectures for ASR
Advanced Training Techniques
Decoding Algorithms Comparison
Hands-on Practical: Building an End-to-End ASR Model
Chapter 3: Language Modeling and Adaptation in ASR
Neural Language Models for ASR
Shallow Fusion and Deep Fusion
Contextual ASR
Speaker Adaptation Techniques
Environment and Channel Adaptation
Unsupervised and Semi-Supervised Learning for ASR
Multi-Lingual and Cross-Lingual ASR
Practice: Fine-tuning ASR with Adaptation Data
Chapter 4: Advanced Text-to-Speech Synthesis
Autoregressive Acoustic Models (Tacotron, Transformer TTS)
Non-Autoregressive Acoustic Models (FastSpeech, ParaNet)
Flow-Based Models for TTS
Generative Adversarial Networks (GANs) in TTS
Prosody Modeling and Control
Expressive Speech Synthesis
Voice Cloning and Conversion
Hands-on Practical: Training an Advanced TTS Model
Chapter 5: Neural Vocoders and Waveform Generation
Limitations of Traditional Vocoders
Autoregressive Waveform Models (WaveNet, WaveRNN)
Flow-Based Vocoders (WaveGlow, FloWaveNet)
GAN-Based Vocoders (MelGAN, HiFi-GAN)
Diffusion Models for Vocoding
Conditioning Neural Vocoders
Evaluation of Synthesized Audio Quality
Hands-on Practical: Using a Neural Vocoder
Chapter 6: Optimization, Deployment, and Toolkits
Model Quantization for Speech Models
Model Pruning and Sparsification
Knowledge Distillation for ASR/TTS
Optimized Inference Engines (ONNX Runtime, TensorRT)
Deployment Considerations for Streaming ASR
Deployment Considerations for Real-Time TTS
Overview of Speech Processing Toolkits (ESPnet, NeMo, Coqui)
Practice: Optimizing a Speech Model

Autoregressive Waveform Models (WaveNet, WaveRNN)

While traditional vocoders operate primarily in the frequency domain and rely on signal processing heuristics, the first major breakthroughs in neural vocoding came from models that directly generate the raw audio waveform, sample by sample, in the time domain. These are known as autoregressive waveform models.

The core idea is elegant yet computationally demanding: predict the next audio sample based on all previously generated samples and, critically, the conditioning acoustic features (like mel-spectrograms) provided by the upstream TTS acoustic model. The probability distribution of the current sample xtx_txt​ is modeled conditioned on past samples x1,...,xt−1x_1, ..., x_{t-1}x1​,...,xt−1​ and the conditioning input ccc:

p(xt∣x1,...,xt−1,c)p(x_t | x_1, ..., x_{t-1}, c)p(xt​∣x1​,...,xt−1​,c)

This sequential dependency allows the models to capture the complex, long-range temporal structures inherent in audio waveforms, leading to very high fidelity and naturalness. However, generating audio one sample at a time, especially at typical sampling rates (e.g., 16kHz, 24kHz, or even 48kHz), makes inference inherently slow.

WaveNet: The Pioneer

WaveNet, introduced by DeepMind, was a landmark achievement demonstrating the potential of deep learning for raw audio generation. It achieved state-of-the-art results for TTS, significantly outperforming existing parametric and concatenative systems in terms of naturalness.

The innovations in WaveNet's architecture address the challenge of modeling long-range dependencies in high-resolution audio signals:

  1. Causal Convolutions: To maintain the autoregressive property (predicting xtx_txt​ only using past samples x<tx_{<t}x<t​), WaveNet uses causal convolutions. In a standard 1D convolution, the output at time ttt might depend on inputs at t−k,...,t,...,t+kt-k, ..., t, ..., t+kt−k,...,t,...,t+k. A causal convolution ensures the output at time ttt only depends on inputs at times t,t−1,t−2,...t, t-1, t-2, ...t,t−1,t−2,.... This is typically implemented by padding the input sequence appropriately on one side and ensuring the convolutional filter doesn't "look into the future".

  2. Dilated Convolutions: Modeling dependencies over thousands of past samples (e.g., several hundred milliseconds) with standard causal convolutions would require an extremely deep network or very large filters, making it computationally infeasible. WaveNet employs dilated convolutions. In these layers, the filter is applied to an input area larger than its length by skipping input values with a certain step (the dilation rate). By stacking layers with exponentially increasing dilation rates (e.g., 1, 2, 4, 8, ..., 512), the network can achieve a very large receptive field (how far back in time the output at step ttt depends on) with relatively few layers, capturing dependencies across various timescales efficiently.

Stacking dilated causal convolutions allows the receptive field to grow exponentially, enabling the model to capture long-range dependencies in the audio signal efficiently. Each layer processes inputs with increasing gaps (dilation).

  1. Gated Activation Units: Inspired by LSTMs and GRUs, WaveNet uses a gated activation mechanism within its residual blocks:

    z=tanh⁡(Wf,k∗x)⊙σ(Wg,k∗x)z = \tanh(W_{f,k} * x) \odot \sigma(W_{g,k} * x)z=tanh(Wf,k​∗x)⊙σ(Wg,k​∗x)

    Here, ∗*∗ denotes convolution, kkk is the layer index, Wf,kW_{f,k}Wf,k​ and Wg,kW_{g,k}Wg,k​ are filter weights, σ\sigmaσ is the sigmoid function, and ⊙\odot⊙ is element-wise multiplication. This gating allows the network to control the flow of information more effectively.

  2. Residual and Skip Connections: To facilitate the training of such deep networks, WaveNet employs both residual connections (adding the input of a block to its output) and skip connections (summing outputs from various blocks to form the final prediction), similar to ResNet architectures.

  3. Conditioning: WaveNet needs to be conditioned on the acoustic features (e.g., mel-spectrograms) provided by the TTS model. This is achieved through local conditioning, where the conditioning features ccc (upsampled to match the audio resolution) influence the gating mechanism:

    z=tanh⁡(Wf,k∗x+Vf,k∗c)⊙σ(Wg,k∗x+Vg,k∗c)z = \tanh(W_{f,k} * x + V_{f,k} * c) \odot \sigma(W_{g,k} * x + V_{g,k} * c)z=tanh(Wf,k​∗x+Vf,k​∗c)⊙σ(Wg,k​∗x+Vg,k​∗c)

    Where Vf,kV_{f,k}Vf,k​ and Vg,kV_{g,k}Vg,k​ are learned linear projections applied to the conditioning input ccc. Global conditioning (e.g., speaker identity vectors) can also be added similarly to influence the entire utterance.

  4. Output Layer: The final output layer predicts the probability distribution for the next sample xtx_txt​. Since raw audio samples are often represented as 16-bit integers (65536 possible values), a simple softmax over all values is computationally expensive. WaveNet originally used an 8-bit mu-law companding transformation (μ\muμ-law encoding) to reduce the number of possible values to 256, followed by a softmax layer. Later work explored using Mixture Density Networks (MDNs), specifically a mixture of logistics distribution, to directly model the continuous waveform or 16-bit discrete values more effectively.

While WaveNet produces exceptionally high-quality audio, its sample-by-sample generation process makes inference extremely slow, often much slower than real-time on standard hardware, limiting its practical deployment in latency-sensitive applications.

WaveRNN: Optimizing for Speed

WaveRNN was developed specifically to address the slow inference speed of WaveNet while retaining the benefits of autoregressive modeling. Instead of relying solely on computationally intensive dilated convolutions, WaveRNN employs a Recurrent Neural Network (RNN), typically a GRU or LSTM, to model the sequential dependencies.

The core WaveRNN update equation looks something like this:

ot,ht=RNN([xt−1,ct],ht−1)o_t, h_t = \text{RNN}( [x_{t-1}, c_t], h_{t-1} )ot​,ht​=RNN([xt−1​,ct​],ht−1​) P(xt)=OutputLayer(ot)P(x_t) = \text{OutputLayer}(o_t)P(xt​)=OutputLayer(ot​)

Where xt−1x_{t-1}xt−1​ is the previous audio sample, ctc_tct​ is the corresponding conditioning feature frame, ht−1h_{t-1}ht−1​ is the previous hidden state of the RNN, oto_tot​ is the RNN output, and hth_tht​ is the updated hidden state. The OutputLayer (often composed of fully connected layers) then predicts the probability distribution for the current sample xtx_txt​, frequently using a softmax over mu-law quantized bins similar to WaveNet.

Important aspects and optimizations of WaveRNN include:

  1. Compact RNN Cells: Using simpler RNN cells like GRUs compared to the large stack of convolutions in WaveNet makes the computation per step potentially faster.
  2. Subscale or Frame-Level Processing: Instead of predicting a single sample at a time, some WaveRNN variants predict multiple samples simultaneously or operate on coarser "subscales" of the audio, significantly speeding up generation. For example, predicting the coarse bits and fine bits of a sample sequentially.
  3. Sparsification and Pruning: WaveRNN models often leverage weight pruning techniques to enforce sparsity in the RNN weight matrices. This allows for highly optimized sparse matrix multiplication routines, leading to substantial speedups on hardware like CPUs, without significantly impacting audio quality.
  4. Direct 16-bit Prediction: Some variants move away from mu-law quantization and predict 16-bit samples directly, often by predicting coarse and fine bits sequentially (e.g., predicting the top 8 bits first, then conditioning the prediction of the bottom 8 bits on the top bits).

WaveRNN and its optimized variants achieve generation speeds significantly faster than the original WaveNet, making real-time synthesis feasible on CPUs and mobile devices, although often with a slight trade-off in maximum achievable audio fidelity compared to the best WaveNet implementations.

Both WaveNet and WaveRNN represent foundational work in neural vocoding, demonstrating that modeling raw audio waveforms autoregressively can yield high quality. Their primary limitation, the sequential generation process, motivated the development of the parallel waveform generation models discussed next.

  • WaveNet: A Generative Model for Raw Audio, Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, Koray Kavukcuoglu, 2016 arXiv preprint arXiv:1609.03499 DOI: 10.48550/arXiv.1609.03499 - The foundational paper introducing WaveNet's architecture, including causal and dilated convolutions, for high-fidelity raw audio generation.
  • Efficient Neural Audio Synthesis, Nal Kalchbrenner, Erich Elsen, Karen Simonyan, Seb Noury, Norman Casagrande, Edward Lockhart, Florian Stimberg, Aaron van den Oord, Sander Dieleman, Koray Kavukcuoglu, 2018 International Conference on Machine Learning (ICML) DOI: 10.48550/arXiv.1802.08435 - The original paper introducing WaveRNN, an efficient autoregressive model for neural audio synthesis, emphasizing speed optimizations.
  • A Survey of Text-to-Speech Synthesis Based on Deep Neural Networks, Heiga Zen, Andrew Senior, Mike Schuster, 2019 ICASSP 2019 - 2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) (IEEE) DOI: 10.1109/ICASSP.2019.8682122 - A comprehensive survey on deep neural network-based text-to-speech synthesis, providing context and discussions on neural vocoders like WaveNet.

© 2026 ApX Machine Learning