Abstract
Ancient Chinese poetry was originally composed to be sung, yet most historical melodies have vanished over centuries. LingGe is a novel AI-driven system designed to bridge this cultural gap by automatically transforming classical poems into complete songs. By integrating expert musical knowledge with advanced deep learning architectures—including Transformers and Diffusion models—LingGe generates melodies, harmonies, and synthesized vocals that adhere to the rigid structural and rhythmic constraints of traditional Chinese verse.
Introduction
Classical Chinese poetry is defined by strict metrics, including specific line lengths, tonal patterns, and rhyme schemes. While modern AI has made significant progress in lyric-to-melody generation, applying these models to ancient poetry presents unique challenges. Standard end-to-end models often ignore the inherent "inner rhythm" of classical text, and there is a severe scarcity of paired "ancient poem + melody" data for training. LingGe addresses these issues through a structured pipeline that combines rule-based rhythm recognition with generative modeling.
System Architecture and Methods
The LingGe system employs a four-stage pipeline to handle the complexity of song generation, ensuring that the final output is both musically coherent and culturally faithful.
- Rhythm Recognition: This module utilizes expert musical knowledge to analyze the poem's structure. It segments the text into verses and choruses and assigns rhythm patterns based on syllable counts (e.g., mapping a five-syllable line to a specific two-bar rhythm).
- Melody Generation: Using a Transformer-based "Template-to-Melody" model, the system first creates a template containing tonality, chord progressions, and pitch patterns. It then "fills in" the notes, ensuring the melody includes natural musical elements like repetitions and variations.
- Accompaniment Generation: A separate Transformer model predicts harmonious accompaniment, typically in a broken-chord style, based on the generated melody and chord progression.
- Audio Synthesis: Expressive vocals are generated using DiffSinger, a diffusion-based model, while the accompaniment is produced via Fluidsynth with a piano timbre. The components are then mixed into a high-quality final audio file.
Data and Training
To overcome data scarcity, the researchers trained LingGe using several specialized datasets:
- Melody Generation: A custom-curated dataset of 28,931 melodies with high-quality chord annotations, normalized to C Major or A Minor.
- Accompaniment: The POP909 dataset, containing 909 songs with detailed MIDI annotations.
- Singing Voice: A proprietary 6-hour dataset of 100 songs performed by a professional female vocalist, used to train the DiffSinger model.
- Vocoder: The OpenSinger dataset was used to pre-train the HiFi-GAN vocoder for high-fidelity audio synthesis.
Key Results and Discussion
Qualitative analysis demonstrates that LingGe produces expressive songs that maintain high structural integrity. By decomposing melody generation into a template-filling task, the system learns musical "grammar" independently of the lyrics, allowing it to generate professional-sounding compositions even without massive amounts of paired data.
As shown in the generated score, the system ensures symmetry and consistency; similar sections of a poem share rhythmic and melodic trends, mimicking human songwriting aesthetics. The use of diffusion-based synthesis avoids the "robotic" quality of traditional methods, providing a more emotive performance of the ancient text.
Limitations and Future Work
While LingGe represents a significant step forward, several areas for improvement remain. Currently, the system is limited to a single female vocalist and a piano-based accompaniment. Future iterations could incorporate diverse voice types (male, operatic) and traditional Chinese instruments like the Guqin or Pipa to enhance cultural authenticity. Additionally, more rigorous quantitative evaluation metrics and human listening tests will be explored to further validate the system's musicality.
Reference: Yong Shan, et al. "LingGe: An Automatic Ancient Chinese Poem-to-Song Generation System." Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence (IJCAI-23).
Summary updated