The application of generative artificial intelligence in music composition has opened new possibilities for personalized therapeutic interventions. This study proposes a music-therapy system based on an emotion-conditioned Cycle-Consistent Generative Adversarial Network (CycleGAN). By embedding the user’s real-time emotional vectors into the residual blocks of the generator, the system precisely guides the style-transfer process, thereby producing new musical segments that simultaneously exhibit therapeutic properties, the target style, and the desired emotional coloration. The system explicitly establishes a mapping between emotional states and acoustic features-such as spectral centroid, rhythmic intensity, and harmonic complexity. For example, a high “calmness” score corresponds to a lower spectral centroid, more stable rhythms, and simpler harmonic progressions, ensuring that the generated music remains acoustically aligned with the therapeutic objective. The system employs unpaired data training and cycle-consistency learning to achieve style conversion while preserving the integrity of musical content. Experiments are conducted on the ComMU dataset, which includes therapeutic, classical, and light music samples. The results demonstrate that the proposed model outperforms Pix2Pix, Unified Neural Translation (UNIT), and StyleGAN in terms of Fréchet Audio Distance (FAD), Spectral Convergence (SC), Content Consistency Error (CCE), pitch fidelity, rhythm consistency, and style matching. CycleGAN exhibits stable performance across the training, validation, and test sets, showing strong generalization ability and high training efficiency. The findings indicate that the proposed system provides a high-quality solution for personalized music therapy generation and offers a practical framework for AI-driven therapeutic music applications.
Yanan Li (Fri,) studied this question.