Diverse and Vivid Sound Generation from Text Descriptions

Guangwei Li, Xuenan Xu, Lingfeng Dai, Mengyue Wu, Kai Yu

Introduction

While artificial intelligence has achieved remarkable success in structured domains like text-to-speech and music generation, the synthesis of general environmental audio—often referred to as "in-the-wild" sound—remains a significant challenge. Unlike speech, which follows linguistic rules, or music, which adheres to melodic and rhythmic structures, environmental sounds are inherently chaotic and overlapping. A single descriptive sentence, such as "Food is frying while a woman talks over the sound of chirping birds," contains complex temporal relationships and varying acoustic textures that are difficult for traditional models to capture.

Researchers from Shanghai Jiao Tong University have addressed this challenge by developing a novel Text-to-Audio (TTA) system. Their approach moves beyond simple onomatopoeic triggers to generate high-fidelity, diverse audio directly from free-form natural language descriptions.

System Architecture

The proposed system utilizes a three-stage pipeline designed to bridge the gap between concise text prompts and high-dimensional audio waveforms.

1. Discrete Spectrogram Learning (VQGAN)

Generating high-resolution spectrograms pixel-by-pixel is computationally prohibitive for autoregressive models. To solve this, the researchers employ a Variation-Quantized Generative Adversarial Network (VQGAN). This component learns a "codebook" of discrete audio patterns, effectively compressing complex mel-spectrograms into a manageable sequence of indices. This transformation allows the subsequent generation stage to treat audio synthesis as a sequence-to-sequence translation task.

2. Text-Conditioned Generation (Transformer + CL‘A’P)

The core of the generation process is a GPT-2-based Transformer. The critical innovation in this stage is the integration of Contrastive Language-Audio Pretraining (CL‘A’P). While standard language models like BERT provide general semantic features, CL‘A’P is specifically trained to align text and audio in a shared embedding space. By using these "auditory-aware" features, the Transformer gains a better understanding of how specific words relate to acoustic characteristics. Furthermore, the researchers found that increasing feature density—providing 30 text features instead of one—significantly improved the model's ability to distinguish between multiple simultaneous sound sources.

3. Waveform Synthesis (MelGAN)

Once the Transformer predicts the sequence of codebook indices, the VQGAN decoder reconstructs the corresponding mel-spectrogram. Finally, a MelGAN vocoder is used to transform the spectrogram into a high-fidelity audible waveform, ensuring the output is clear and recognizable.

Experimental Evaluation

The model was rigorously tested on two primary benchmarks: AudioCaps, a large-scale dataset of 50,000 clips with direct human captions, and Clotho, a more challenging dataset featuring complex, literary descriptions.

Quantitative Results

On the AudioCaps dataset, the CL‘A’P-enhanced model demonstrated state-of-the-art performance:

  • FID (Fréchet Inception Distance): 0.778, indicating high-fidelity reconstruction.
  • PSNR (Peak Signal-to-Noise Ratio): 14.83.
  • Captioning Metrics: The model scored high on SPICE and CIDEr metrics, suggesting that the generated sounds were distinct enough for an independent AI captioner to accurately identify the intended sound events.

Qualitative Human Evaluation

Human raters evaluated the output on a scale of 0 to 10. The CL‘A’P-based model achieved a 6.79 for Relevance and 6.13 for Quality. While these scores significantly outperformed BERT-based baselines, they remain below the ground truth recordings (9.55), highlighting the remaining gap between AI-generated audio and real-world recordings.

Limitations and Future Directions

Despite the advancements, the researchers identified several areas for improvement, often referred to as the "uncanny valley" of sound generation:

  • Temporal Logic: The model occasionally struggles with the chronological order of events, sometimes alternating sounds (e.g., dog barking then man talking) rather than naturally overlapping them.
  • Volume Consistency: Unpredictable fluctuations in volume within a single clip can occur.
  • Rare Sound Classes: Sounds that appear infrequently in the training data are sometimes ignored by the model.
  • Pseudo-Speech: When tasked with generating human voices, the model often produces unintelligible, slurred audio rather than clear speech.

Future research will focus on refining the chronological accuracy and duration of generated events to create more realistic and immersive soundscapes.

Summary updated

BibTeX
@inproceedings{li2023diverse,
  author = {Guangwei Li and Xuenan Xu and Lingfeng Dai and Mengyue Wu and Kai Yu},
  title = {{Diverse and Vivid Sound Generation from Text Descriptions}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=-HvuJkFZmH},
}
Figure