Source-linked AI summary

ESPnet-Codec: Comprehensive Training and Evaluation of Neural Codecs for Audio, Music, and Speech

Jiatong Shi, Jinchuan Tian, Yihan Wu, Jee-weon Jung, Jia Qi Yip, Yoshiki Masuyama, William Chen, Yuning Wu, Yuxun Tang, Massa Baali, Dareen Alharhi, Dong Zhang, Ruifan Deng, Tejes Srivastava, Haibin Wu, Alexander H. Liu, Bhiksha Raj, Qin Jin, Ruihua Song, Shinji Watanabe

arXiv:2409.15897v2eess.AScs.SD

TL;DR

Neural codec research lacks controlled comparisons across diverse applications, training conditions, and evaluation settings. The paper introduces ESPnet-Codec for reproducible codec training and downstream integration, alongside VERSA for broad evaluation. Experiments show metric-dependent codec strengths, substantial effects from data scale, and integration across six ESPnet tasks.

  • Problem

    Neural codec comparisons are complicated by varying training and evaluation settings, limited metric coverage, and downstream frameworks focused mainly on generation.

    Source: §1 · p. 1, §2 · p. 2
  • Method

    ESPnet-Codec provides ESPnet-based recipes for codec training and evaluation, while VERSA offers controlled evaluation across diverse codec metrics and models.

    Source: §1 · p. 1
  • Results

    No single codec achieves the best scores across all metrics, and large-scale data can substantially alter relative model performance across speech, audio, and music tests.

    Source: §4.3 · p. 5
  • Takeaways & Limitations

    ESPnet-Codec supports codec analysis through six downstream tasks, including both generation and understanding applications.

    Source: §1 · p. 1, §5 · p. 6

    Codec preprocessing can include model-dependent transformations such as conversion to the frequency domain.

    Source: §3.1 · p. 2

Abstract

from arXiv · show

Neural codecs have become crucial to recent speech and audio generation research. In addition to signal compression capabilities, discrete codecs have also been found to enhance downstream training efficiency and compatibility with autoregressive language models. However, as extensive downstream applications are investigated, challenges have arisen in ensuring fair comparisons across diverse applications. To address these issues, we present a new open-source platform ESPnet-Codec, which is built on ESPnet and focuses on neural codec training and evaluation. ESPnet-Codec offers various recipes in audio, music, and speech for training and evaluation using several widely adopted codec models. Together with ESPnet-Codec, we present VERSA, a standalone evaluation toolkit, which provides a comprehensive evaluation of codec performance over 20 audio evaluation metrics. Notably, we demonstrate that ESPnet-Codec can be integrated into six ESPnet tasks, supporting diverse applications.

1. INTRODUCTION

Neural codecs convert audio into discrete representations and are increasingly used beyond compression in speech and audio applications. ESPnet-Codec and VERSA address inconsistent comparisons by combining reproducible recipes, broad evaluation, and integration across downstream tasks.

  • Neural codecs use encoder-decoder architectures with quantizers to produce discrete codes, extending their original compression role to speech and audio tasks.Source: §1 · p. 1
  • Variations in training data, environments, and evaluation settings make controlled codec comparisons difficult and can affect downstream experimental findings.Source: §1 · p. 1
  • ESPnet-Codec provides five neural codec algorithms with all-in-one recipes covering data preparation, training, inference, and evaluation across audio, music, and speech.Source: §1 · p. 1
  • VERSA evaluates existing codec algorithms in a controlled environment, while experiments show no single model is best across all metrics.Source: §1 · p. 1
  • ESPnet-Codec integrates pre-trained codecs into six downstream tasks and finds correlations between codec performance and downstream effectiveness, including feasible use in understanding tasks.Source: §1 · p. 1

2. RELATED WORKS

Existing codec toolkits provide incomplete training, evaluation, and downstream-task coverage, limiting transparent comparisons. ESPnet-Codec addresses these gaps through ESPnet-style recipes, VERSA evaluation, and integration with six diverse tasks.

  • Existing toolkits often lack complete data, training, inference, evaluation, and pre-trained-model pipelines, complicating comparisons across models.Source: §2 · pp. 1–2
  • Evaluation toolkits commonly support only a few metrics, which can introduce bias, whereas broader metric coverage enables more comprehensive codec analysis.Source: §2 · p. 2
  • Current downstream integrations focus mainly on generation, leaving diverse codec-token uses and understanding tasks insufficiently represented.Source: §2 · p. 2
  • ESPnet-Codec reimplements codec algorithms within the ESPnet ecosystem, provides transparent comparisons through ESPnet-style recipes, and evaluates them with VERSA.Source: §2 · p. 2
  • The toolkit supports ASR, TTS, speaker recognition, speech separation and enhancement, singing voice synthesis, and self-supervised pre-training through a discretization interface.Source: §2 · p. 2

3. FUNCTIONALITIES

ESPnet-Codec provides a configurable neural-codec framework, VERSA offers broad evaluation coverage, and the platform connects codec models to diverse downstream speech, audio, and music tasks.

3.1. General Neural Codec Framework

  • ESPnet-Codec defines a serial codec pipeline that encodes sampled audio, quantizes hidden states into multi-codebook discrete codes, and decodes them into reconstructed signals.It supports waveform or STFT representations, primarily RVQ quantization, convolutional encoder-decoder variants, and GAN-based reconstruction, adversarial, and quantization objectives.Source: §3.1 · p. 2

3.2. Example Neural Codec Models

  • The framework implements representative neural codecs including SoundStream, Encodec, DAC, FunCodec, and HiFi-Codec, preserving their differing quantizers, discriminators, and training designs.Examples include GRVQ in HiFi-Codec, factorized and normalized codes in DAC, and frequency-domain training in FunCodec.Source: §3.2 · p. 3

3.3. Speech and Audio Quality Evaluation with VERSA

  • VERSA unifies codec evaluation across intrusive, non-intrusive, and perceptual metrics, addressing risks from limited metric sets and inconsistent evaluation conditions.Its supported measures include signal-quality, intelligibility, speaker-similarity, error-rate, and learned perceptual metrics.Source: §3.3 · p. 3, Table 2 · p. 3

3.4. Downstream Application

  • ESPnet-Codec integrates codec tokens into ASR, NAR and AR TTS, speaker recognition, speech separation and enhancement, singing voice synthesis, and SSL workflows.The implementations replace or supplement conventional acoustic inputs with discrete codec representations across these downstream tasks.Source: §3.4 · pp. 3–4

4. EXPERIMENTS

Experiments use LibriTTS as a base dataset and AMUSE as a large-scale multilingual, music, audio, and speech corpus, with standardized codec training and evaluation settings.

4.1. Codec Dataset

  • LibriTTS provides 460 hours for training, while AMUSE combines open-source speech, audio, and music datasets and evaluates both 16kHz and 44.1kHz settings.AMUSE development and test sets are sampled from its constituent datasets, with additional singing-voice test data.Source: §4.1 · p. 4

4.2. Codec Experimental Setup

  • The base setting uses one V100 GPU and 1-second chunks, whereas the large-scale setting uses four Ampere GPUs and 2-second chunks.Both settings use 600k training steps, while batch sizes are 8 and 128, respectively.Source: §4.2 · p. 4
  • All codecs use 32-level residual-vector-quantization codebooks with 1,024 codes and multi-band training at randomly controlled bitrates from 2 to 16 kbps.Model loss weights are tuned on development sets, and configurations mostly follow original papers or released implementations.Source: §4.2 · p. 4
  • The AMUSE corpus adds high-quality TTS-focused speech data because its original speech collection contains varied quality from upsampling low-rate signals.This adjustment targets balance in the large-scale training data.Source: §4.2 · p. 4
  • Two implementation changes are reported: Encodec omits its loss balancer, and DAC omits code-space factorization because low-dimensional hidden states were difficult to converge.These choices were based on development-set effectiveness and empirical convergence behavior.Source: §4.2 · p. 4
  • The experiments reproduce DAC, Encodec, FunCodec, and SpeechTokenizer on LibriTTS, while evaluation standardizes resampling and task-specific metric procedures.CER uses Whisper-large-V3, and speaker similarity uses cosine similarity between RawNet3 embeddings.Source: §4.2 · p. 5

4.3. Codec Results and Discussion

Codec results vary substantially across datasets, domains, and metrics: no model dominates universally, and large-scale AMUSE training changes relative performance compared with LibriTTS.

4.3. Codec Results and Discussion

  • Encodec leads most metrics among ESPnet-Codec models on LibriTTS, while SoundStream has stronger F0 tracking and DAC has better 24kHz PESQ.The reproduced models otherwise achieve performance comparable to existing codec implementations.Source: §4.3 · p. 5
  • DAC outperforms several metrics but has much worse Whisper WER than FunCodec, demonstrating metric-dependent trade-offs among codec models.This contrast motivates evaluating codecs with a broad metric suite rather than a single measure.Source: §4.3 · p. 5
  • Large-scale AMUSE data substantially changes codec rankings across speech, audio, and music, while no single model achieves the best scores on every metric.Encodec performs well on LibriTTS but generalizes less effectively to AMUSE speech.Source: §4.3 · p. 5, Table 7 · p. 5

4.4. CodecSUPERB Evaluation

CodecSUPERB evaluates resynthesized audio on hidden sets through pretrained models for ASR, speaker recognition, emotion recognition, and audio event classification.

4.4. CodecSUPERB Evaluation

  • Encodec trained on base LibriTTS performs best across most speech-related CodecSUPERB metrics, whereas SoundStream trained on AMUSE performs better on audio-related metrics.The benchmark reports WER, equal error rate, and accuracy for downstream applications.Source: §4.4 · p. 5
  • Scaling training data improves SoundStream and DAC but does not necessarily improve Encodec, especially on speech-related metrics.The results suggest that larger datasets may require additional strategies because codec architectures are sensitive to diverse scenarios.Source: §4.4 · p. 5

4.5. Downstream Integration: ASR

Discrete ASR converts codec codebook entries into embeddings and evaluates them on LibriSpeech, revealing codec- and training-data-dependent downstream performance.

4.5. Downstream Integration: ASR

  • Encodec trained on LibriTTS achieves the best discrete-ASR performance, while SoundStream is strongest among codecs trained on AMUSE.Experiments use LibriSpeech 960 and report WER on test-clean and test-other.Source: §4.5 · pp. 5–6
  • The ASR results indicate that codec data scaling is not consistently predictive of downstream performance and that audio-quality metrics correlate only weakly with it.Discrete codes are converted to embeddings by looking up codec codebooks before entering the ASR system.Source: §4.5 · p. 6

4.6. Downstream Integration: TTS

TTS performance depends on both codec choice and training-data consistency. LibriTTS-based codecs consistently outperform AMUSE counterparts across NAR-TTS and AR-TTS.

4.6. Downstream Integration: TTS

  • LibriTTS-based codecs consistently outperform AMUSE counterparts in both NAR-TTS and AR-TTS.The authors attribute this mainly to consistency between codec and downstream TTS training datasets.Source: §4.6 · p. 6
  • SoundStream achieves the best intelligibility in NAR-TTS, whereas Encodec achieves the best UTMOS.Source: §4.6 · p. 6

4.7. Downstream Integration: SSE

Codec behavior varies across speech separation and singing voice synthesis. The results show that downstream performance depends not only on codec quality but also on dataset choice and codec-token prediction difficulty.

4.7. Downstream Integration: SSE

  • DAC trained on AMUSE achieves the best PSEQ and STOI, while Encodec trained on LibriTTS achieves the highest DNSMOS in speech separation.Scaling from LibriTTS to AMUSE improves DAC performance but not necessarily SoundStream or Encodec performance.Source: §4.7 · p. 6

4.8. Downstream Integration: SVS

  • SoundStream is the better overall singing voice synthesis choice because it outperforms Encodec on SACC and SingMOS despite a worse MCD score.Source: §4.8 · p. 6
  • Singing voice synthesis depends on codec-token prediction difficulty as well as the codec’s upper-bound resynthesis quality.Source: §4.8 · p. 6

4.9. Downstream Integration: SPK

Codec tokens preserve speaker information and can reduce self-supervised pre-training cost, but downstream codec-input training may be unstable and codec-based speaker verification can overfit.

4.9. Downstream Integration: SPK

  • AMUSE-trained codec tokens consistently outperform LibriTTS-trained tokens for speaker verification, confirming that codec tokens encapsulate speaker information.Significant overfitting was also observed, motivating future research in codec-based speaker verification.Source: §4.9 · p. 6

4.10. Downstream Integration: SSL

  • Codec-input SSL pre-training requires 200 GPU hours versus 280 hours for waveform inputs in an equivalent data setting.Source: §4.10 · p. 6
  • Quantized codec inputs can cause unstable SSL pre-training, with certain codecs failing even after hyperparameter tuning.Source: §4.10 · p. 6

5. CONCLUSION

ESPnet-Codec provides a framework for neural codec training and evaluation across diverse scenarios, while VERSA supplies unified audio evaluation. Integration into six downstream tasks enables broader application analysis and probing of neural codecs.

5. CONCLUSION

  • ESPnet-Codec focuses on neural codec training and evaluation across diverse scenarios, complemented by VERSA for unified comprehensive speech evaluation.Source: §5 · p. 6
  • Integration into six downstream tasks demonstrates the framework’s applicability while enabling extensive probing and analysis of neural codecs.Source: §5 · p. 6
Loading 2409.15897v2…