TL;DR
MelTok introduces a novel two-dimensional (2D) tokenizer and token-based vocoder capable of compressing high-fidelity 44.1 kHz audio into a single discrete codebook. By preserving the inherent time-frequency structure of audio, MelTok eliminates the frequency-variant redundancy of traditional 1D tokenizers, achieving reconstruction quality comparable to complex multi-codebook models while remaining highly efficient for downstream Large Audio Language Models (LALMs).
What Problem Does This Paper Address?
To power Large Audio Language Models (LALMs) for tasks like speech synthesis or audio understanding, continuous audio waveforms must first be converted into discrete tokens using neural audio codecs.
Currently, codecs face a trade-off:
- Multi-codebook approaches (like Residual Vector Quantization used in DAC or SNAC) capture high-quality audio but generate multiple parallel token sequences, making downstream language model decoding slow and complex.
- Single-codebook approaches (like WavTokenizer) are much more efficient for language models but struggle to capture fine-grained acoustic details, particularly high-frequency components (above 20 kHz).
This failure happens because standard codecs use 1D tokenizers that process audio sequentially along the time axis. This treats frequency content as a variant property, creating massive data redundancy and resulting in "over-smoothed," muffled audio reconstructions. MelTok addresses this by rethinking tokenization in two dimensions.
Methods
MelTok splits the compression and reconstruction process into a stable, two-stage framework:
-
Stage One: Mel-Spectrogram Reconstruction via 2D Tokenizer Instead of tokenizing raw waveforms, MelTok converts audio into a 2D log-mel spectrogram. It then "patchifies" this spectrogram (using a Haar wavelet transform) and passes it through a 2D convolutional tokenizer (built on the Cosmos architecture). This compresses the audio into a single sequence of discrete tokens from an 8192-size codebook. To prevent over-smoothing, the authors optimize this stage using a combination of $L_1$ reconstruction loss and a VGG-19-based perceptual loss.
-
Stage Two: Token-Based Vocoder To map these discrete tokens back to high-fidelity waveforms, the authors propose a token-based vocoder based on the Vocos architecture. Crucially, they mathematically demonstrate that using discrete tokens as input bounds the propagated error, stabilizing GAN training. The vocoder utilizes Snake activation functions and spectral normalization to maintain Lipschitz continuity, ensuring small perturbations in the latent space don't cause massive distortions in the output audio.
Datasets
The model was trained and evaluated using several high-resolution audio datasets:
- AudioSet: The entire balanced training subset was used for general sound and environmental noise training, and the evaluation set was used to test general audio reconstruction.
- musdb18-hq: Used for training and testing music domain reconstruction.
- HQ-Conversations: A high-quality dataset used to augment speech training.
All audio files were processed at their original high-fidelity sampling rate of 44 kHz.
Key Insights and Ideas
- The Power of 2D Representation: 1D tokenizers force the model to pack all frequency variations into a single temporal sequence. By treating the spectrogram as a 2D image, MelTok exploits "frequency-invariance" patterns, leading to a much more compact and less redundant representation.
- Disentangled Latent Space: A t-SNE visualization reveals that MelTok's 2D tokenizer naturally separates low-, mid-, and high-frequency structures into distinct clusters within the latent space. In contrast, 1D tokenizers produce highly entangled, overlapping embeddings.
- Discrete Codes Stabilize GANs: Feeding discrete codebook tokens into the vocoder—rather than continuous spectrograms—introduces a strict upper bound on reconstruction errors. This mathematical constraint prevents extreme deviations during adversarial training, leading to better audio quality and faster convergence (within just 50 epochs).
Key Results
MelTok bridges the gap between single-codebook efficiency and multi-codebook quality:
- High-Frequency Fidelity: MelTok accurately reconstructs high-frequency details that cause other single-codebook models to produce a bright ringing or muffled sound.
- Objective Metrics: On the AudioSet evaluation, MelTok achieved a ViSQOL score of 4.17, outperforming state-of-the-art single-codebook baselines like WavTokenizer (3.26) and UniCodec (3.18), and matching the performance of the 9-codebook DAC baseline (4.19). It also achieved the lowest Log-Spectral Distance (LSD) of 0.77 and Mel Cepstral Distortion (MCD) of 2.92.
- Downstream Performance: Beyond compression, MelTok's tokens proved superior for downstream understanding tasks. It achieved the highest F1 score (0.3398) for sound event classification and outperformed all other single-codebook codecs in music genre classification on the GTZAN dataset.
Limitations and Future Work
Despite its strong performance, the authors note a few limitations:
- Sensitivity to Upsampled Data: Training is easily disrupted if the dataset contains low-resolution audio (e.g., 16 kHz) that has been artificially upsampled to 44.1/48 kHz. This is a common issue in open-source audio corpora.
- Downstream Generation Untested: While MelTok provides an excellent representation for audio understanding, the authors have not yet integrated these tokens into an actual generative Audio Language Model (ALM) to evaluate downstream text-to-audio or audio-to-audio generation. This remains a primary focus for future work.
Summary updated