Diffsound: Discrete Diffusion Model for Text-to-sound Generation

TL;DR

Diffsound uses a discrete diffusion model for non-autoregressive text-to-sound generation, achieving 5x faster inference and higher quality (MOS 3.56 vs 2.786).

cs.SD 🔴 Advanced 2022-07-20 21 views
Dongchao Yang Jianwei Yu Helin Wang Wen Wang Chao Weng Yuexian Zou Dong Yu
text-to-sound diffusion model VQ-VAE non-autoregressive deep learning

Key Findings

Methodology

This paper introduces a framework combining a text encoder, VQ-VAE, and a discrete diffusion-based token decoder. The core innovation, Diffsound, predicts all mel-spectrogram tokens simultaneously, then refines them iteratively, overcoming the unidirectional bias and error accumulation of autoregressive models. The model employs multi-step denoising guided by a masked strategy, trained on large-scale audio datasets like AudioSet with multi-objective losses (reconstruction, adversarial, semantic). Experiments demonstrate that Diffsound surpasses AR decoders in quality (MOS 3.56 vs 2.786) and inference speed (5x faster).

Key Results

  • Diffsound achieves a MOS score of 3.56, outperforming the autoregressive baseline at 2.786, with inference speed five times faster. Quantitative metrics like FID and KL indicate closer similarity to real audio. Ablation studies confirm the effectiveness of multi-step refinement and pretraining. The model generalizes well to environmental sounds and multi-source scenarios, demonstrating robustness and efficiency.

Significance

This work advances the field of text-to-sound synthesis by introducing a high-speed, high-fidelity non-autoregressive approach. It addresses critical limitations of existing autoregressive models, such as slow inference and error accumulation, enabling real-time applications in VR, gaming, and multimedia content creation. The integration of diffusion models into discrete sequence generation broadens the scope of generative modeling, opening new avenues for multimodal content synthesis and interactive AI systems.

Technical Contribution

The paper pioneers the application of discrete diffusion models for mel-spectrogram token prediction, proposing a multi-step iterative refinement process with a masking strategy. It combines large-scale pretraining on AudioSet with multi-objective loss functions, enhancing robustness and generalization. The architecture effectively balances quality and speed, providing a new paradigm for high-fidelity, real-time sound synthesis, distinct from prior autoregressive or GAN-based methods.

Novelty

This is the first work to apply discrete diffusion models to text-to-sound generation, introducing a multi-round iterative correction mechanism that significantly reduces inference time and bias. Unlike traditional autoregressive models that predict tokens sequentially, Diffsound predicts all tokens at once and refines them through multiple steps, representing a fundamental shift in sequence generation. The approach also leverages large-scale audio pretraining and novel masking strategies, setting a new benchmark in efficiency and quality.

Limitations

  • The model's performance degrades in highly complex multi-source environments due to limited training data diversity and model capacity.
  • Fine-grained high-frequency details are still challenging to restore, leading to somewhat muffled sounds in certain cases.
  • Training requires substantial computational resources, limiting accessibility for smaller research groups or deployment on edge devices.

Future Work

Future directions include integrating multi-modal cues (visual, contextual) to improve multi-source sound synthesis, reducing computational costs via model compression, and exploring reinforcement learning for adaptive refinement. Extending the framework to generate multi-channel or spatialized audio, and applying it to real-time interactive systems, are promising avenues. Further research will focus on enhancing detail fidelity and robustness in diverse acoustic environments.

AI Executive Summary

Generating realistic and diverse sounds from text descriptions is a longstanding challenge in multimedia AI. Existing methods, primarily autoregressive models, excel in quality but are hampered by slow inference and error propagation, limiting their real-time applicability. Addressing these limitations, this paper introduces Diffsound, a novel non-autoregressive framework leveraging discrete diffusion models for text-to-sound synthesis.

Diffsound’s architecture integrates a text encoder (e.g., CLIP), a VQ-VAE for discretizing mel-spectrograms, and a diffusion-based token decoder. Unlike traditional models that predict tokens sequentially, Diffsound predicts all tokens simultaneously, then refines them over multiple iterations guided by a masking strategy. This iterative denoising process effectively reduces bias and error accumulation, enabling faster and more accurate sound generation.

Experimental results demonstrate that Diffsound achieves a MOS score of 3.56, surpassing the 2.786 of autoregressive counterparts, while inference speed is increased fivefold. Quantitative metrics such as FID and KL further confirm the high fidelity and relevance of generated sounds. The model benefits from pretraining on large-scale datasets like AudioSet, which helps mitigate data scarcity issues and enhances generalization across diverse sound categories.

This work marks a significant step forward in real-time, high-quality text-to-sound synthesis, with broad implications for entertainment, virtual reality, and assistive technologies. Future research will explore multi-modal integration, model compression, and multi-channel audio generation, aiming to bring immersive sound experiences into everyday applications. Despite current limitations in complex multi-source environments and high-frequency detail restoration, the proposed framework opens new horizons for multimodal AI content creation.

Deep Analysis

Background

The evolution of sound synthesis has transitioned from rule-based and signal processing methods to deep learning approaches. Early models like spectral-based synthesis and concatenative methods lacked flexibility. The advent of GANs, such as WaveGAN and SpecGAN, improved realism but faced stability issues. Recent progress with VQ-VAE and autoregressive models like Transformer-based architectures enabled more accurate spectrogram prediction. However, these models suffer from slow inference and error accumulation, especially in complex scenes. Diffusion models, originally successful in image synthesis, have recently been adapted for speech and audio generation, showing promise in improving fidelity and diversity. Nonetheless, their application to discrete sequence generation, like mel-spectrogram tokens, remains underexplored. This paper builds on these developments, aiming to combine the strengths of diffusion models with discrete token prediction for efficient, high-quality sound synthesis.

Core Problem

Existing text-to-sound models predominantly rely on autoregressive decoders, which predict spectrogram tokens sequentially. This approach leads to slow inference times unsuitable for real-time applications, and the step-by-step prediction causes bias and error accumulation, degrading sound fidelity and relevance. Moreover, the limited availability of large-scale paired text-audio datasets constrains model training and generalization. Addressing these issues requires a model capable of rapid inference, robust error correction, and effective utilization of large unpaired audio datasets. The challenge lies in designing a non-autoregressive, iterative refinement mechanism that maintains high fidelity while significantly reducing inference latency.

Innovation

The paper introduces Diffsound, a novel non-autoregressive framework that employs a discrete diffusion process for mel-spectrogram token prediction. Key innovations include: 1) Applying a multi-step iterative denoising process inspired by diffusion models, enabling simultaneous token prediction and refinement. 2) Incorporating a masking strategy during training to simulate noise corruption, facilitating robust denoising. 3) Leveraging large-scale pretraining on AudioSet with a mask-based text generation strategy to address data scarcity. 4) Combining multi-objective loss functions—reconstruction, adversarial, and semantic—to enhance fidelity and relevance. These innovations collectively enable faster inference, mitigate bias, and improve sound quality compared to traditional autoregressive methods.

Methodology

  • �� Extract text features using a pretrained text encoder (e.g., CLIP).• Encode mel-spectrograms into discrete tokens via VQ-VAE, training with a combination of reconstruction and adversarial losses.• Design a diffusion-based token decoder that predicts all tokens simultaneously, then refines them iteratively:
  • During training, corrupt tokens with a masking strategy to simulate noise.
  • The model learns to denoise tokens over multiple steps, guided by the corrupted input.
  • Use a transition matrix to define the corruption process, enabling flexible noise addition.
  • During inference, initialize tokens randomly and perform multiple denoising steps to recover the original sequence.
  • �� Fine-tune the pretraining on small-scale text-audio pairs, employing curriculum learning from simple to complex sounds.
  • �� Decode the refined tokens into mel-spectrograms with the VQ-VAE decoder, then generate waveforms using a trained vocoder like MelGAN.

Experiments

The model was trained on AudioSet for pretraining and fine-tuned on AudioCaps. Evaluation used subjective MOS scores and objective metrics such as FID and KL divergence. Ablation studies assessed the impact of the number of diffusion steps, masking strategies, and pretraining. Baselines included autoregressive Transformer models and GAN-based approaches. Hyperparameters like diffusion steps, token length, and learning rates were tuned for optimal performance. The experiments demonstrated that Diffsound achieves a MOS of 3.56, outperforming AR models, with inference speed increased five times. The robustness was validated across diverse sound categories, including environmental and multi-source sounds.

Results

Diffsound significantly improves sound quality and inference speed. MOS scores reached 3.56, compared to 2.786 for AR models. The inference time was reduced by 80%, achieving fivefold speedup. Quantitative metrics like FID and KL confirmed the high fidelity and relevance of generated sounds. Ablation results showed that multi-step refinement and masking strategies are critical for performance. The model generalizes well to unseen sound categories, demonstrating robustness and practical viability for real-time applications.

Applications

This framework can be directly used in virtual reality, gaming, and multimedia production to generate immersive environmental sounds from text descriptions. It enables content creators to produce high-fidelity audio without extensive sound design expertise, streamlining workflows. Additionally, it supports real-time interactive systems, such as voice assistants and AR/VR environments, where quick and relevant sound generation enhances user experience. Long-term, this technology could facilitate personalized soundscapes and adaptive audio in smart environments, transforming how we create and experience sound content.

Limitations & Outlook

Despite its advantages, Diffsound's performance drops in highly complex multi-source scenes due to limited training data diversity. High-frequency detail restoration remains challenging, sometimes resulting in muffled sounds. The training process is computationally intensive, requiring substantial resources, which limits deployment on edge devices. Future work should focus on model compression, multi-modal integration, and expanding training datasets to improve robustness and efficiency in diverse real-world scenarios.

Plain Language Accessible to non-experts

想象你在厨房做一道复杂的菜。传统的方法就像逐个添加调料,慢且容易出错。而现在,有个聪明的厨师,他先大致猜出所有调料的组合,然后用几次调整,让味道变得完美。这就像Diffsound模型,先一次性预测所有声音的组成部分,然后不断修正,直到听起来像真的一样。这种方法既快又准,就像你用魔法一样,能在短时间内做出美味又自然的菜肴。它让声音生成变得像魔法厨房,不仅快,还能做出更真实的声音。

ELI14 Explained like you're 14

想象你在玩拼图游戏,传统的方法是一个块一个块拼,花费时间也容易拼错。而新方法像是你先把所有拼图轮廓拼出来,然后用几次调整,让拼图变得完美。这就像Diffsound,它先预测出所有声音的元素,然后不断修正,直到听起来很自然。这样一来,不仅快,还能拼出更真实、更丰富的声音,就像你用魔法一样厉害!

Abstract

Generating sound effects that humans want is an important topic. However, there are few studies in this area for sound generation. In this study, we investigate generating sound conditioned on a text prompt and propose a novel text-to-sound generation framework that consists of a text encoder, a Vector Quantized Variational Autoencoder (VQ-VAE), a decoder, and a vocoder. The framework first uses the decoder to transfer the text features extracted from the text encoder to a mel-spectrogram with the help of VQ-VAE, and then the vocoder is used to transform the generated mel-spectrogram into a waveform. We found that the decoder significantly influences the generation performance. Thus, we focus on designing a good decoder in this study. We begin with the traditional autoregressive decoder, which has been proved as a state-of-the-art method in previous sound generation works. However, the AR decoder always predicts the mel-spectrogram tokens one by one in order, which introduces the unidirectional bias and accumulation of errors problems. Moreover, with the AR decoder, the sound generation time increases linearly with the sound duration. To overcome the shortcomings introduced by AR decoders, we propose a non-autoregressive decoder based on the discrete diffusion model, named Diffsound. Specifically, the Diffsound predicts all of the mel-spectrogram tokens in one step and then refines the predicted tokens in the next step, so the best-predicted results can be obtained after several steps. Our experiments show that our proposed Diffsound not only produces better text-to-sound generation results when compared with the AR decoder but also has a faster generation speed, e.g., MOS: 3.56 \textit{v.s} 2.786, and the generation speed is five times faster than the AR decoder.

cs.SD cs.AI eess.AS