TL;DR
Current audio Large Language Models (LLMs) often struggle with "hallucinations" and word skipping because their underlying audio codecs were designed for compression, not meaning. This paper introduces X-Codec, a novel architecture that embeds semantic information directly into audio tokens, significantly reducing word error rates in speech synthesis and improving the coherence of generated music and sound.
What Problem Does This Paper Address?
In the world of text-based LLMs, tokens represent meaningful units like words or sub-words. In audio LLMs, however, we typically use acoustic codecs (like EnCodec or DAC) to turn continuous waveforms into discrete tokens. The problem is that these codecs were originally optimized for data compression—minimizing file size while keeping the audio sounding "okay"—rather than capturing the semantic content of the audio.
The authors demonstrate that these standard codecs have poor "phonetic discriminability." When an LLM like VALL-E uses these tokens, it often misinterprets them, leading to high Word Error Rates (WER), skipped words, or nonsensical audio generation. Essentially, the LLM is being asked to predict local fluctuations in a signal without a clear understanding of the underlying "meaning" (phonemes in speech or structure in music).
Methods
The authors propose X-Codec, which features a distinctive "X-shaped" architecture designed to bridge the gap between acoustic fidelity and semantic richness.
Key technical innovations include:
- Dual-Feature Integration: X-Codec takes two inputs: the raw audio waveform (for acoustic features) and features extracted from a pre-trained self-supervised learning (SSL) model like HuBERT (for semantic features).
- Unified Quantization: Instead of treating semantic and acoustic tokens separately, X-Codec concatenates these features and passes them through a single Residual Vector Quantizer (RVQ). This ensures every token in the sequence contains a blend of both structural and textural information.
- Semantic Reconstruction Loss: During training, the model doesn't just try to reconstruct the waveform; it also employs a Mean Squared Error (MSE) loss to reconstruct the original semantic features from the SSL model.
- Generalized Semantics: For non-speech tasks (music and sound), the authors developed a variant called HuBERT-General-Audio, trained on 200,000 hours of diverse audio to provide a semantic backbone for sounds beyond human speech.
Datasets
The researchers evaluated X-Codec across three major domains:
- Speech: Trained on LibriSpeech and evaluated using LibriTTS for zero-shot text-to-speech (TTS) tasks.
- Music: Used approximately 100,000 hours of music-only data for training, with evaluation performed on the MUSDB18 dataset.
- General Sound: Trained on AudioCaps and the AudioSet SL subset for text-to-sound generation.
- Benchmarks: They utilized the ARCH benchmark to specifically measure audio semantic understanding across acoustic events, music, and speech.
Key Insights and Ideas
- The Semantic Gap is Real: Phonetic Discriminability (ABX) tests confirmed that traditional codecs like EnCodec and DAC are significantly worse at distinguishing between similar speech sounds compared to semantic models like HuBERT.
- Unified vs. Disentangled: Unlike previous attempts (like SpeechTokenizer) that try to separate content from timbre into different tokens, X-Codec provides a uniform enhancement. This makes it much easier to integrate into existing LLM architectures that expect a flat sequence of tokens.
- Scaling Semantics: The authors found that as they increased the number of quantization layers ($n_q$), X-Codec's phonetic discriminability continued to improve, whereas disentanglement-based methods plateaued.
- Beyond Speech: The "semantic shortcoming" isn't just a speech problem. By applying semantic enrichment to music and environmental sounds, the authors showed that LLMs could better capture complex musical structures and produce more contextually accurate sound effects.
Key Results
The quantitative improvements were substantial across the board. In zero-shot TTS tasks using the VALL-E framework:
- Word Error Rate (WER): X-Codec reduced the WER from 7.70% (baseline acoustic codec) to 4.07% (X-Codec-hubert).
- Audio Quality: It achieved a UTMOS (Speech MOS predictor) score of 4.16, outperforming both the baseline (3.89) and SpeechTokenizer (3.84).
- Phonetic Accuracy: In ABX tests, X-Codec achieved an error rate of 3.3% (within-speaker), nearly matching the performance of the raw HuBERT model (3.3%) and vastly outperforming EnCodec (17.5%).
In music and sound generation, X-Codec consistently outperformed baseline codecs across metrics like Frechet Audio Distance (FAD) and CLAP scores, indicating better alignment between text prompts and generated audio.
Limitations and Future Work
The authors acknowledge a "no free lunch" trade-off:
- Computational Overhead: Adding a semantic extraction layer (like HuBERT) increases the computational cost and processing time during encoding.
- Compression Fidelity: The focus on semantics can slightly impair traditional acoustic metrics like Mel-distance or STFT-distance. While the audio sounds better to humans (higher UTMOS), it may technically be a less "accurate" reconstruction of the original waveform in a mathematical sense.
- Future Directions: The authors suggest exploring more efficient semantic encoders to reduce overhead and investigating how this semantic enrichment scales with even larger audio LLMs.
Summary updated