Recognition of Emotions in Music Using Machine Learning Algorithms

Authors

  • Prof. Sheetal V. Shelke Assistant Professor, Bharati Vidyapeeth’s College of Engineering for Women, Pune, India. Author
  • Dr. Mangal Patil Associate Professor, Bharati Vidyapeeth College of Engineering (Deemed to be University), Pune, India. Author
  • Prof. Vinod P. Mulik Assistant Professor, Bharati Vidyapeeth’s College of Engineering for Women, Pune, India. Author
  • Prof. Kanchan D. Mahajan Assistant Professor, Bharati Vidyapeeth’s College of Engineering for Women, Pune, India. Author
  • Ms. Isha P. Vetal Student, Bharati Vidyapeeth’s College of Engineering for Women, Pune, India. Author
  • Ms. Nita R. Sonawane Student, Bharati Vidyapeeth’s College of Engineering for Women, Pune, India. Author

DOI:

https://doi.org/10.47392/IRJAEM.2025.0394

Keywords:

Decision Tree, Machine Learning, Random Forest, Support Vector Machine

Abstract

Music is vital for entertainment, emotion regulation, and stress relief. With digital platforms like Spotify, classifying large music datasets has become essential. This introduces a machine-learning framework to detect four emotions Happy, Sad, Calm, and Energetic in Hindi songs. Music has the unique ability to evoke and convey a wide range of human emotions, making it a powerful medium for both artistic expression and practical applications.  A curated Hindi music dataset was segmented into 20-second WAV clips (44.1 kHz), preprocessed with high-pass filtering and volume normalization. Acoustic features extracted included: (1) 13-dimensional MFCCs, (2) 12-dimensional chroma vectors, (3) Zero-Crossing Rate, and (4) Spectral Rolloff. Data was split into training (70%), validation (15%), and testing (15%) sets using stratified sampling. Three classifiers were applied: Decision Tree (max depth 10), Random Forest (100 trees, depth 12), and XGBoost (200 estimators, learning rate 0.1, depth 6). XGBoost performed best with 86.4% accuracy, while Random Forest and Decision Tree achieved 83.6% and 74.2%, respectively. "Sad" and "Calm" were the most confused classes (~8%). Results show ensemble models effectively classify emotions in regional music and support applications like mood-based playlists and smart music systems.

Downloads

Download data is not yet available.

Downloads

Published

2025-07-25