MelCap: A Unified Single-Codebook Neural Codec for High-Fidelity Audio Compression

Jingyi Li, Zhiyuan Zhao, Yunfei Liu, Lijian Lin, Ye Zhu, Jiahao Wu, Qiuqiang Kong, Yu LiSubmission to ICLR 2026 · Withdrawn

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:

  1. 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.
  2. 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.
  3. 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:

  1. 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.

  2. 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.

  3. 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_train subset, containing speech, music, and everyday ambient/environmental sounds) and the hq-conversations dataset (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

Abstract

Neural audio codecs have recently emerged as powerful tools for high-quality and low-bitrate audio compression, leveraging deep generative models to learn latent representations of audio signals. However, existing approaches either rely on a single quantizer that only processes speech tasks, or on multiple quantizers that are not well suited for downstream tasks. To address this issue, we propose MelCap, a high-fidelity neural codec with a single codebook. By decomposing audio reconstruction into two stages, our method preserves more acoustic details than previous single-codebook approaches, while achieving performance comparable to mainstream multi-codebook methods. In the first stage, audio is transformed into mel-spectrograms, which are compressed in the image domain and quantized into compact single tokens using a 2D tokenizer. A perceptual loss is further applied to mitigate the over-smoothing artifacts observed in spectrogram reconstruction. In the second stage, a Vocoder recovers waveforms from the mel discrete tokens in a single forward pass, enabling real-time decoding. Both objective and subjective evaluations demonstrate that MelCap achieves quality on comparable to state-of-the-art multi-codebook codecs, while retaining the computational simplicity of a single-codebook design, thereby providing an effective representation for downstream tasks.
BibTeX
@misc{li2025melcap,
  author = {Jingyi Li and Zhiyuan Zhao and Yunfei Liu and Lijian Lin and Ye Zhu and Jiahao Wu and Qiuqiang Kong and Yu Li},
  title = {{MelCap: A Unified Single-Codebook Neural Codec for High-Fidelity Audio Compression}},
  year = {2025},
  eprint = {2510.01903},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.01903},
}
Figure