Introduction
Neural audio codecs (NACs) are critical components in modern speech processing, serving as the bridge between continuous waveforms and discrete tokens for Speech Language Models (SLMs). For real-world deployment, particularly in interactive AI assistants, NACs must satisfy three primary constraints: low-latency streaming capability, computational efficiency to preserve hardware resources for the LLM, and architectural simplicity (ideally using a single codebook).
Historically, high-performance NACs have relied on Convolutional Neural Networks (CNNs). However, CNNs involve complex hyperparameter tuning and scale poorly in terms of computational overhead. TS3-Codec (Transformer-Based Simple Streaming Single Codec) represents a paradigm shift as the first NAC to adopt a pure, convolution-free, transformer-only architecture.
Architecture and Methodology
The TS3-Codec architecture simplifies the traditional NAC design by replacing convolutional downsampling and upsampling with linear layers and self-attention mechanisms.
Key Components:
- Linear Reshaping: The encoder uses two simple linear layers to transform the raw waveform into frames, avoiding the complexity of strided convolutions.
- Sliding Window Attention: To maintain linear computational complexity and enable streaming, the model employs a sliding-window attention mechanism. This allows the transformer to process audio in real-time by attending only to a fixed history of past frames (typically 16 or 32).
- Factorized Vector Quantization (VQ): Unlike models using Residual Vector Quantization (RVQ), TS3-Codec maps features to a single large codebook (up to 131,072 entries). This simplifies the tokenization process for downstream language models.
- GAN-Based Training: The model is trained within a Generative Adversarial Network (GAN) framework, optimizing for reconstruction fidelity (via Mel-spectrogram loss) and perceptual naturalness using discriminators.
Experimental Setup
The model was trained on the Libri-light dataset, encompassing 60,000 hours of unlabelled speech. Evaluation was conducted on the Librispeech 'test-clean' set to assess performance across various metrics, including Word Error Rate (WER), Perceptual Evaluation of Speech Quality (PESQ), and UTMOS for naturalness.
Results and Discussion
TS3-Codec demonstrates significant improvements in computational efficiency without sacrificing audio quality.
Efficiency and Scaling
A primary finding is that transformers are substantially more efficient than CNNs at scale. For instance, a 160M parameter convolutional model like BigCodec requires computational resources comparable to a 1-billion-parameter transformer. TS3-Codec achieves state-of-the-art performance with only 7.6G MACs—an 88% reduction compared to the 61.1G MACs required by the streaming version of BigCodec.
Audio Quality and Intelligibility
In naturalness evaluations, TS3-Codec (X2) achieved a UTMOS score of 3.84, surpassing both the streaming BigCodec (3.73) and Mimi (3.60). Furthermore, the model maintains high intelligibility (low WER) and speaker similarity (SPK-SIM), ensuring that the compressed tokens preserve both content and identity. Even at ultra-low bitrates (600 bps), TS3-Codec outperforms non-streaming baselines in perceptual quality and distortion metrics.
Conclusion
TS3-Codec proves that a pure transformer architecture can outperform traditional convolution-based NACs in both efficiency and quality. By eliminating the "inherent biases" of fixed convolutional weights and leveraging dynamic self-attention, the model provides a simpler, more scalable solution for the next generation of Speech Language Models. Future work will focus on integrating semantic distillation to further improve word error rates and expanding the architecture's capabilities to music and environmental audio.
Summary updated