TL;DR
MelCap is a two-stage neural audio codec that achieves high-fidelity 44.1 kHz audio compression using a single discrete codebook. By treating mel-spectrograms as 2D images for tokenization and pairing them with a fast GAN vocoder, MelCap matches the perceptual quality of mainstream multi-codebook codecs while providing a simpler discrete representation for downstream generative modeling.
What Problem Does This Paper Address?
Neural audio codecs compress continuous audio into discrete tokens, acting as the bridge between raw waveforms and audio language models (e.g., in text-to-speech, audio generation, and speech recognition). However, modern architectures face a tradeoff:
- Multi-codebook setups (like Residual Vector Quantization in EnCodec or DAC) achieve high fidelity across diverse sounds, but they require predicting multiple token streams per frame, adding complexity and compounding errors in downstream generative models.
- Single-codebook approaches (like WavTokenizer) are substantially easier to model, but have largely been restricted to speech at lower sampling rates (e.g., 24 kHz) and struggle to capture high frequencies and complex acoustic textures in music and environmental sounds.
- End-to-end waveform GANs can suffer from training instability, often dropping subtle high-frequency harmonics (above 20 kHz).
MelCap tackles this by bridging single-codebook efficiency with full-band, general-audio fidelity.
Methods
MelCap decouples the compression pipeline into two specialized stages:
-
Stage 1: 2D Mel-Spectrogram Tokenization
Instead of 1D temporal convolution on raw waveforms, audio is converted into a 96-band log-mel spectrogram. A 2D transformer-based VQ-VAE (adapted from NVIDIA's Cosmos visual tokenizer) compresses both the time and frequency axes into a single stream of discrete tokens. To prevent the "blurry" or muffled spectra typical of pure $L_1$ reconstruction losses, the authors introduce a 2D perceptual loss based on pre-trained VGG-19 feature maps. -
Stage 2: Token-to-Waveform Neural Vocoding
Rather than training end-to-end from scratch, the frozen discrete tokens feed into a GAN-based neural vocoder (extending the Vocos architecture). The vocoder predicts Fourier components and reconstructs waveforms via an Inverse Short-Time Fourier Transform (ISTFT) in a single forward pass. -
Bounded Error & Lipschitz Stability
The authors provide theoretical justification showing that discrete codebook errors are inherently bounded, unlike continuous representations. To prevent error amplification through the vocoder, they utilize Snake activation functions and spectral normalization, ensuring Lipschitz continuity across the generative network and ISTFT operations.
Audio (44 kHz) ──► Log-Mel Spectrogram ──► 2D VQ-VAE Encoder ──► Single Discrete Codebook
│
Audio Waveform ◄── Vocos Vocoder (ISTFT) ◄── 2D Decoder ◄──────────────┘
Datasets
- Training: AudioSet (
bal_trainsubset, containing speech, music, and everyday ambient/environmental sounds) and thehq-conversationsdataset (Magic Data) for voice augmentation, all processed at 44.1 kHz. - Evaluation: The AudioSet evaluation set, an unseen out-of-distribution music evaluation set, and pre-trained Consistent Ensemble Distillation (CED) models for downstream sound event classification.
Key Insights and Ideas
- Equivalence of Perceptual and Feature-Matching Losses: The authors prove that VGG perceptual loss applied to spectrograms shares the exact mathematical form of discriminator feature-matching loss in vocoder GANs. Both measure $L_1$ distances in convolutional feature spaces, providing a unified explanation for why perceptual guidance prevents over-smoothing.
- Spectrograms Make Single-Codebook General Audio Possible: Directly quantizing raw 44 kHz waveforms into one codebook typically loses details above 20 kHz. Compressing in the 2D time-frequency domain preserves acoustic structure much more compactly.
- Controlled Error Propagation: Theoretical proofs show that ISTFT is Lipschitz continuous ($L_{\text{ISTFT}} \le \|h\|_\infty \sqrt{NT}$). Coupled with bounded codebook quantization, this guarantees that stage-1 token discretization errors do not explode into wild artifacts during waveform generation.
Key Results
- AudioSet Performance: MelCap achieved a ViSQOL score of 4.29 and the lowest spectral distortion (LSD of 0.66, Mel Distance of 0.56) using only 1 codebook (260 tokens/sec). This matched or outperformed multi-codebook baselines like DAC (ViSQOL 4.46 with 9 codebooks at 774 tokens/sec) and SNAC (4.35 with 4 codebooks at 240 tokens/sec), while significantly beating existing single-codebook models.
- Out-of-Distribution Music: On unseen music, MelCap maintained top-tier spectral fidelity (Mel Distance of 0.40, LSD of 1.01), outperforming WavTokenizer (LSD 1.49, Mel Distance 0.85).
- Downstream Sound Event Classification: Audio reconstructed by MelCap achieved higher sound event classification performance (0.3398 F1 / 0.1345 mAP) than DAC (0.3363 / 0.1251) and SNAC (0.3223 / 0.1278), confirming that critical semantic and acoustic cues were preserved.
Limitations and Future Work
- Training Data Bottlenecks: Many publicly available 44 kHz / 48 kHz audio corpora actually contain "upsampled" 16 kHz content, which limits training fidelity.
- Metric Limitations: Conventional metrics (like UTMOS or voiced/unvoiced F1) are tailored to speech and do not reliably evaluate arbitrary environmental noises or musical passages.
- Future Directions: The authors suggest incorporating multi-band frequency decomposition to allocate model capacity more adaptively across frequency ranges, collecting true native high-resolution corpora, and building better evaluation benchmarks for non-speech audio.
Summary updated