Introduction
Generating high-quality music from natural language remains a significant challenge in AI. Traditional approaches often rely on symbolic generation (e.g., MIDI), which lacks the nuance of raw audio, or tag-based systems that fail to capture the rich semantics of free-form text. ERNIE-Music addresses these gaps by introducing a text-to-waveform diffusion model capable of generating diverse, high-fidelity music directly from descriptive prompts. By leveraging a novel dataset of web-scraped music paired with community comments, ERNIE-Music outperforms existing symbolic and GAN-based systems in both audio quality and text-music relevance.
Methodology
The core of ERNIE-Music is a continuous-time diffusion framework designed to iteratively denoise a signal into a coherent music waveform.
Diffusion Backbone and Velocity Prediction
Unlike standard diffusion models that predict added noise, ERNIE-Music is trained to predict velocity ($v_t$). This approach enhances stability and performance when generating complex raw audio waveforms. The model starts with pure noise and gradually refines it based on the input text conditioning.
Multi-Level Conditioning
To ensure high alignment between the generated audio and the text prompt, the model employs a dual-conditioning strategy:
- Global Context: The semantic essence of the prompt is fused with the diffusion timestep to guide the overall structure.
- Local Detail: A Conditional Self-Attention (CSA) mechanism allows the model to attend to specific tokens in the text sequence while generating corresponding segments of the audio. This ensures that specific descriptors (e.g., "gentle piano") are accurately reflected in the output.
Multi-Lingual Encoding
By utilizing the ERNIE-M encoder, the system supports multi-lingual prompts (e.g., Chinese and English) without requiring explicit translation, facilitating global usability.
Data Acquisition: Web Music with Text
A primary bottleneck in music generation is the lack of high-quality parallel data. The authors addressed this by creating the Web Music with Text dataset. Instead of relying on sparse tags or expensive manual annotations, they scraped music platforms for tracks and their top-voted community comments. These comments often provide rich, evocative descriptions of mood, instrumentation, and atmosphere—qualities that are often lost in rigid tagging systems. The final dataset includes approximately 4,000 high-quality 20-second samples.
Experimental Results
ERNIE-Music was evaluated against state-of-the-art baselines, including Mubert (retrieval-based) and Musika (GAN-based), through human listening tests.
Performance Metrics
- Text-Music Relevance: ERNIE-Music achieved a score of 2.43/3, significantly outperforming TSM (2.05) and Mubert (1.85).
- Audio Quality: The model scored 3.63/5, surpassing the Musika model's score of 3.03.
- Human Preference: In side-by-side comparisons, evaluators preferred ERNIE-Music's relevance 55% of the time, highlighting the effectiveness of natural language conditioning over symbolic methods.
Training Stability
The training process demonstrates consistent convergence. Experiments with different conditioning fusion methods, such as concatenation and element-wise summation, show that the model is robust to architectural variations in how text features are integrated.
Conclusion and Future Work
ERNIE-Music demonstrates that raw waveform generation guided by natural language is a powerful paradigm for AI music creation. By utilizing "weakly supervised" community data, the model captures the emotional soul of music more effectively than keyword-based systems.
Future research will focus on extending the duration of generated clips beyond the current 20-second limit, improving inference speed to overcome the iterative nature of diffusion, and incorporating vocal tracks to move toward a fully comprehensive music generation system.
Summary updated