Abstract
NanoCodec is a high-efficiency neural audio codec that compresses speech into just 12.5 tokens per second—significantly lower than the industry standard of 50–100 FPS. By utilizing a partially causal architecture and optimized quantization, it enables Speech LLMs to generate high-quality audio with 2.5x lower latency and over 2x faster inference speeds compared to previous state-of-the-art models.
Introduction
Large Language Models (LLMs) have recently expanded into the audio domain (Speech LLMs), treating sound like text by "tokenizing" it using neural audio codecs. However, most existing codecs operate at high frame rates (e.g., 50 to 100 frames per second). For an autoregressive model, this creates a significant bottleneck: generating one second of speech requires predicting 50–100 tokens sequentially, leading to slow inference, high computational costs, and difficulty in modeling long-term dependencies. While some "low frame-rate" codecs exist, they often sacrifice audio quality, struggle with speaker similarity, or introduce high "lookahead" latency that makes real-time streaming impossible. NanoCodec aims to find the "sweet spot" where frame rate is minimized without compromising speech intelligibility or quality.
Methodology
NanoCodec builds upon the Low Frame-rate Speech Codec (LFSC) but introduces several key architectural and functional improvements:
- Partially Causal Architecture: A non-causal encoder is used during training, but a causal decoder is employed for low-latency inference. This allows the model to start generating audio immediately without waiting for future "lookahead" frames.
- Architectural Refinements: Standard Leaky ReLU activations are replaced with Snake activations for better periodic signal modeling. The encoder is optimized with multi-receptive field fusion (MRF), reducing the parameter count by 45% compared to the baseline LFSC.
- Finite Scalar Quantization (FSQ): Instead of Residual Vector Quantization (RVQ), NanoCodec uses FSQ with eight codebooks to discretize audio into tokens efficiently.
- Speaker Consistency Loss (SCL): To ensure reconstructed voices maintain original speaker characteristics, a loss function based on a pre-trained speaker encoder maximizes cosine similarity between original and reconstructed audio embeddings.
Datasets
The models were trained on a combination of Common Voice (105 languages, 3.2k hours) and the MLS (Multilingual LibriSpeech) English training set (25.5k hours). Evaluation was performed on the MLS test set and the DAPS (Digital Archive of Pronunciation, Script, and Styles) dataset for clean audio performance.
Key Insights
The authors hypothesize that 12.5 FPS is an ideal lower bound for speech tokenization because English speakers produce roughly 10–12 phonemes per second. Dropping further to 6.25 FPS causes a massive spike in Character Error Rate (CER) because a single token must represent multiple distinct phonemes, leading to unintelligible speech.
Furthermore, the study highlights a trade-off in causality: while fully causal models perform worst in quality, a partially causal model (non-causal encoder, causal decoder) provides a competitive balance—offering high-quality encoding for training while maintaining low-latency decoding for deployment.
Results and Discussion
NanoCodec achieves high-quality 22.05kHz audio compression at 1.78 kbps and only 12.5 FPS. It outperforms prominent models like Mimi, WavTokenizer, and TS3-Codec across various bitrates in metrics like PESQ (perceptual quality) and CER (intelligibility).
When integrated into a state-of-the-art Speech LLM (Koel-TTS), NanoCodec demonstrated significant performance gains:
- 2.33x improvement in Real-Time Factor (RTF).
- 2.5x reduction in Time-To-First-Audio (TTFA) latency.
- Enhanced speaker similarity compared to the 21.5 FPS baseline.
Conclusion
NanoCodec successfully addresses the latency and efficiency bottlenecks in Speech LLMs by optimizing the frame rate to 12.5 FPS. While the model occasionally struggles to generalize to completely unseen speakers at this low frame rate due to high information density per token, it represents a significant step forward in real-time, high-quality speech generation. Future work will explore architectural refinements to the LLM side to better handle high-density tokens and scaling to broader multilingual environments.
Summary updated