TL;DR
Autoregressive audio models like WaveNet generate pristine speech but are notoriously slow because they produce audio strictly sample-by-sample. This paper introduces WaveRNN along with a suite of hardware-aware optimizations—including dual softmax layers, structured weight pruning, and subscale tensor folding—that enable high-fidelity 24kHz audio generation up to 4x faster than real-time on GPUs and in real-time on standard mobile CPUs.
What Problem Does This Paper Address?
Sequential generative models excel at text-to-speech (TTS) synthesis because they capture the complex joint probability of audio waveforms. However, this autoregressive nature means they are strictly serial: sample $t$ cannot be computed until sample $t-1$ is finished.
For high-fidelity audio, which requires 24,000 samples per second, this creates a massive computational bottleneck. Deep architectures like WaveNet require executing dozens of layers sequentially for every single sample. The authors target the core components of sampling latency: the number of sequential operations ($N$), the computation time per operation ($c(op)$), the overhead of launching operations ($d(op)$), and the total sequence length ($|u|$).
Methods
The authors introduce three orthogonal techniques to tackle these bottlenecks:
1. WaveRNN & The Dual Softmax Layer
Instead of a deep convolutional network, the authors use a single-layer Recurrent Neural Network (RNN). To efficiently predict 16-bit audio without a massive, computationally prohibitive $2^{16}$-way softmax output, they split the 16-bit sample into 8 coarse (high) bits ($c_t$) and 8 fine (low) bits ($f_t$). The fine bits are conditioned on the coarse bits within a Dual Softmax layer, reducing the output space to two efficient $2^8$-way choices.
To eliminate GPU operation launch overhead ($d(op)$) and memory bandwidth bottlenecks, they implement the entire sampling process as a single persistent GPU operation, stashing all model parameters directly inside the GPU registers.
2. Structured Weight Sparsification
To reduce the computation time per operation ($c(op)$), the authors prune weights based on magnitude during training. To ensure this sparsity actually translates to speedups on mobile CPUs (which struggle with unstructured sparse matrices), they introduce structured block sparsity (specifically $4 \times 4$ and $16 \times 1$ blocks). This drastically reduces the memory overhead required to store the sparsity mask.
3. Subscale WaveRNN
To address the sequence length ($|u|$), the authors propose a tensor-folding scheme called Subscaling. A long audio sequence is interleaved into $B$ separate sub-tensors of lower frequency. The model generates these sub-tensors in a batched fashion. By assuming that distant future dependencies are weak, the generation of subsequent sub-tensors can begin with minimal lag, allowing the model to generate multiple samples per step.
Datasets
The models were trained and evaluated on a high-quality text-to-speech dataset consisting of 44 hours of North American English speech recorded by a single professional speaker. The generation is conditioned on conventional linguistic features and predicted pitch information, synthesizing raw audio at 24 kHz in 16-bit format.
Key Insights and Ideas
- The Sparsity Paradox: For a fixed parameter budget, a large sparse network significantly outperforms a small dense network. This relationship holds true even at extreme sparsity levels exceeding 96%.
- Memory Bandwidth is the Real Bottleneck: On modern hardware, the primary hindrance to fast autoregressive sampling isn't raw FLOP capacity—it's the overhead of launching thousands of tiny operations and constantly moving weights from memory to registers. Persistent kernels solve this by keeping weights on-chip.
- Locality in Subscaling: Perfect global autoregressive context isn't strictly necessary to maintain audio quality. By capping the future horizon in interleaved sub-tensors, you can safely batch generation without the audio sounding disjointed or losing local dependencies.
Key Results
- GPU Speedups: WaveRNN-896 achieves audio quality on par with a 60-layer WaveNet (showing no significant difference in human A/B preference tests) while generating 24kHz audio 4x faster than real-time (96,000 samples/sec) on an NVIDIA P100 GPU.
- On-Device Mobile Real-Time: A Sparse WaveRNN with 1024 hidden units and 95% structured sparsity ($16 \times 1$ blocks) successfully runs in real-time on off-the-shelf mobile CPUs like the Snapdragon 835, achieving over 31,400 samples/sec.
- Parallel Generation: Subscale WaveRNN successfully generates 16 samples per step simultaneously with virtually no loss in Mean Opinion Score (MOS) compared to the baseline WaveRNN (4.30 vs 4.37).
Limitations and Future Work
- Training Intensity: Investigating and utilizing extreme sparsity requires starting with very large dense layers, making the training phase computationally intensive before pruning takes effect.
- Fusion Limits: While a "Fused" variant of the Subscale WaveRNN achieves 10x real-time on a GPU by splitting the hidden state to generate 32 bits per step, the authors note that audio quality drops off rapidly if scaled beyond a $2\times$ factor.
- Hardware-Specific Tuning: The persistent GPU kernel design is highly tailored to the register file size and multiprocessor count of specific hardware (like the P100), meaning it requires careful re-engineering to port efficiently to newer or different GPU architectures.
Summary updated