NanoCodec: Towards High-Quality Ultra Fast Speech LLM Inference

Edresson Casanova, Paarth Neekhara, Ryan Langman, Shehzeen Hussain, Subhankar Ghosh, Xuesong Yang, Ante Jukić, Jason Li, Boris Ginsburg

TL;DR

NanoCodec is a state-of-the-art neural audio codec designed to drastically accelerate Speech Large Language Models (LLMs) by compressing audio down to just 12.5 frames per second (FPS) at 1.78 kbps. By employing a clever partially causal architecture and a novel speaker consistency loss, it reduces model parameters by 45% and speeds up text-to-speech (TTS) inference by over 2x compared to previous low-frame-rate baselines, all while maintaining excellent audio quality and intelligibility.

What Problem Does This Paper Address?

Generative speech models increasingly treat audio synthesis as a language modeling problem. To do this, they rely on neural audio codecs to convert continuous waveforms into discrete tokens. However, standard codecs operate at high frame rates (often 50 to 75+ FPS). For autoregressive Speech LLMs, a high frame rate means the model must predict a massive number of tokens sequentially to generate just one second of audio, leading to painfully slow training and inference.

While recent research has attempted to lower frame rates, doing so typically degrades audio quality and speech intelligibility. Furthermore, many existing codecs are non-causal, meaning they require a "lookahead" buffer of future frames. This introduces significant latency, making real-time, streamable speech generation nearly impossible. The authors of NanoCodec set out to find the optimal balance between frame rate, bitrate, causality, and reconstruction fidelity.

Methods

NanoCodec builds upon the Low Frame-rate Speech Codec (LFSC) framework but introduces several key architectural and algorithmic upgrades:

  1. Partially Causal Architecture: The authors discovered that for downstream tasks like TTS, the codec's encoder is only used during training (or not at all if semantic features are used). Therefore, NanoCodec pairs a non-causal encoder with a fully causal decoder. This eliminates lookahead token caching during inference, drastically reducing first-token latency.
  2. Generator Improvements: The convolutional encoder incorporates multi-receptive field fusion (MRF) with expanded dilation rates (1, 3, and 5). In the decoder, standard Leaky ReLU activations are replaced with Snake activations to better model periodic waveforms.
  3. Speaker Consistency Loss (SCL): To prevent the low frame rate from washing out speaker identity, NanoCodec introduces a novel loss function. It uses a pre-trained speaker encoder to extract embeddings from both the ground-truth and reconstructed audio, maximizing their cosine similarity during training.
  4. Quantization & Discriminators: The model uses Finite Scalar Quantization (FSQ) with 8 codebooks. For adversarial training, it swaps out the multi-scale complex STFT discriminator for a more robust multi-band multi-scale STFT discriminator alongside multi-period discriminators.

Datasets

The codec was trained on a massive corpus of 22.05 kHz audio:

  • Common Voice (derived): 3.2k hours of audio spanning 105 languages and ~100,000 speakers.
  • MLS English: 25.5k hours of audio from 4,329 speakers.

For evaluation, the authors used the 44.1 kHz MLS test set (covering 8 languages) and clean studio recordings from the DAPS dataset (speakers F10 and M10).

Key Insights and Ideas

  • The Phoneme Sweet Spot: Why does 12.5 FPS work so well? The authors note that English speakers produce roughly 10 to 12 phonemes per second. At 12.5 FPS, a single frame roughly corresponds to a single phoneme. Dropping further to 6.25 FPS causes a severe drop in intelligibility because the codec tries to compress multiple distinct phonemes into a single token.
  • Asymmetric Causality Wins: A fully causal model (causal encoder + causal decoder) yields poor speech intelligibility. However, the partially causal approach delivers performance nearly identical to a fully non-causal model while unlocking low-latency streaming during LLM generation.
  • Bitrate vs. Intelligibility: Lowering the bitrate has a disproportionately harsh impact on the Character Error Rate (CER) compared to speaker similarity or general audio quality.

Key Results

NanoCodec achieves state-of-the-art performance across multiple bitrate tiers, outperforming established models like Mimi, WavTokenizer, and TAAE.

Table 1: Reconstruction performance of different codec configurations using MLS 44.1kHz test set and F10 and M10 DAPS speakers
Table 2: Reconstruction performance of different SOTA codecs.

When integrated into Koel-TTS (a state-of-the-art zero-shot TTS model), NanoCodec delivered massive efficiency gains:

  • 2.5x Lower Latency: The Time-to-First-Audio (TTFA) was cut by approximately 2.5 times compared to the LFSC baseline.
  • 2.33x Speedup: The inference Real-Time Factor (RTF) improved by more than double when moving from a 21.5 FPS codec to NanoCodec's 12.5 FPS configuration.
  • Better Intelligibility: The 12.5 FPS model actually achieved a lower Character Error Rate (0.49%) than its 21.5 FPS counterpart (0.76%), likely because the token rate closely matches the natural phoneme rate of speech.
Table 3: Koel-TTS evaluation using different codecs

Limitations and Future Work

While NanoCodec excels at speed and intelligibility, the authors noted a slight trade-off: at 12.5 FPS, the shorter sequence length reduces the available speaker context for the downstream LLM. This caused the TTS model to struggle slightly with speaker similarity on unseen voices.

To counteract this, the authors had to increase the context audio length from 5 to 10 seconds during inference. They conclude that fully capitalizing on ultra-low frame rates will require future architectural adjustments within the Speech LLMs themselves, rather than relying solely on optimizing the codec.

Summary updated

BibTeX
@inproceedings{casanova2025nanocodec,
  author = {Edresson Casanova and Paarth Neekhara and Ryan Langman and Shehzeen Hussain and Subhankar Ghosh and Xuesong Yang and Ante Jukić and Jason Li and Boris Ginsburg},
  title = {{NanoCodec: Towards High-Quality Ultra Fast Speech LLM Inference}},
  booktitle = {Interspeech},
  year = {2025},
  doi = {10.21437/interspeech.2025-827},
}
Figure