TL;DR
APNet2 is a next-generation neural vocoder that reconstructs high-quality speech by predicting amplitude and phase spectra in parallel. By leveraging the ConvNeXt v2 architecture and a multi-resolution discriminator, it achieves speech quality comparable to state-of-the-art models like HiFi-GAN while delivering significantly faster inference speeds—up to 47x real-time on a single CPU core.
What Problem Does This Paper Address?
Neural vocoders are the "voice box" of modern speech synthesis, converting abstract acoustic features (like mel-spectrograms) into audible waveforms. Traditionally, researchers faced a grueling trade-off between quality and efficiency.
Autoregressive models produce great audio but are painfully slow. GAN-based models like HiFi-GAN improved speed by using transposed convolutions to upsample features, but this upsampling remains computationally expensive. Recent "all-frame-level" vocoders (like the original APNet and Vocos) try to skip upsampling by predicting spectra directly at the input resolution and using the Inverse Short-Time Fourier Transform (ISTFT) to generate audio. However, the original APNet struggled with higher sampling rates (22.05 kHz) and longer frame shifts, largely because modeling the "phase" of a speech signal is notoriously difficult and sensitive to temporal discontinuities.
Methods
APNet2 introduces several structural and mathematical upgrades to solve these stability and quality issues:
- ConvNeXt v2 Backbone: The researchers replaced the standard ResNet blocks with ConvNeXt v2. This architecture includes a Global Response Normalization (GRN) layer, which enhances feature diversity and modeling capacity, allowing the network to better capture the complexities of speech spectra.
- Explicit Phase Modeling: Unlike some competitors that treat phase as a "black box," APNet2 uses a dedicated Phase Spectrum Predictor (PSP). It employs a parallel estimation architecture to directly output "wrapped" phase spectra.
- Linear Anti-Wrapping Loss: To train the phase predictor, the authors moved from a negative cosine loss to a linear anti-wrapping function. This change helps the model more accurately mitigate errors caused by the cyclical nature of phase (where $0$ and $2\pi$ are the same point).
- Multi-Resolution Discriminator (MRD): During training, the authors replaced the traditional Multi-Scale Discriminator (MSD) with an MRD. The MRD analyzes the audio at various temporal and spectral resolutions, which helps the generator produce more realistic textures and reduces overfitting.
- Hinge GAN Loss: The model shifts from least-squares GAN loss to a hinge formulation, which is often more stable for high-fidelity audio synthesis.
Datasets
The model was trained and evaluated using the LJSpeech dataset, a standard benchmark consisting of approximately 24 hours of 22.05 kHz English speech from a single female speaker. The authors used 12,000 clips for training, 100 for validation, and 500 for testing.
Key Insights and Ideas
- Upsampling is the Enemy of Speed: By predicting spectra at the exact same temporal resolution as the input mel-spectrogram, APNet2 avoids the heavy computational tax of transposed convolutions used in models like HiFi-GAN.
- Phase Matters: The paper reinforces that explicit phase modeling is crucial. While other models (like Vocos) perform well, they can struggle with pitch accuracy (F0-RMSE) because they don't constrain the phase prediction as strictly as APNet2 does.
- The "Aha" of Linear Loss: One of the more subtle but vital findings was that a linear anti-wrapping function is more suitable for phase prediction than the trigonometric (cosine) functions used in earlier iterations, leading to more precise spectral reconstruction.
Key Results
APNet2 strikes an impressive balance between performance and resource usage:
- Quality: In Mean Opinion Score (MOS) tests, APNet2 achieved a score of 3.83 for analysis-synthesis, making it statistically comparable to HiFi-GAN (3.88) and iSTFTNet (3.93), while significantly outperforming the original APNet and Vocos.
- Inference Speed:
- On GPU: APNet2 runs at 665x real-time, nearly 20x faster than HiFi-GAN.
- On CPU: It runs at 47x real-time, making it highly viable for on-device applications where GPUs aren't available.
- Pitch Accuracy: APNet2 showed a much lower F0-RMSE (44.33) compared to Vocos (148.33), indicating it is far more reliable at maintaining the correct melody and intonation of speech.
Limitations and Future Work
While APNet2 is a powerhouse for single-speaker synthesis, the paper notes a few areas for growth:
- Speaker Diversity: The current results are limited to the LJSpeech dataset. Testing on multi-speaker or noisy datasets would be the next logical step to prove its robustness.
- Application Expansion: The authors plan to adapt the APNet2 architecture for other speech tasks, such as Speech Enhancement (SE) and Voice Conversion (VC), where high-efficiency spectral prediction is equally valuable.
Summary updated