Preprint / Version 1

An AI based approach to classifying genre and emotion of music using spectrograms

##article.authors##

  • Pranavi Tadigadapa Independent

DOI:

https://doi.org/10.58445/rars.3107

Abstract

Music classification has become an essential feature of modern technology, from recommendation systems and mood-based playlists to therapeutic interventions. Beyond genre classification, recent work emphasizes the importance of recognizing the emotional tone of music. This study investigates whether spectrogram-based image classification can be applied using simple, accessible AI tools. Specifically, I ask: (1) Can spectrograms serve as reliable features for both genre and emotion classification? and (2) How accurate can a lightweight AI tool be in this task? Using the Emotify dataset, I trained two models—one for genre and one for emotion. Results showed moderate success in genre classification (57% accuracy vs 25% chance levels) but poor performance in emotion classification (21% accuracy vs 11% chance levels). Findings suggest that spectrograms capture some, but not all aspects of genre and emotion related differences, that can be reliably detected using simple AI tools.

References

G. Björklund, M. Bohlin, E. Olander, J. Jansson, C. E. Walter, and M. Au-Yong-Oliveira, “An exploratory study on the Spotify recommender system,” in Information Systems and Technologies (WorldCIST 2022), A. Rocha, H. Adeli, G. Dzemyda, and F. Moreira, Eds., Lecture Notes in Networks and Systems, vol. 469. Cham: Springer, 2022, pp. 169–178.

S. A. Fulop and K. Fitz, “A spectrogram for the twenty-first century,” Acoustics Today, vol. 2, no. 3, pp. 26–33, 2006.

L. Wyse, “Audio spectrogram representations for processing with convolutional neural networks,” arXiv preprint, arXiv:1706.09559, 2017.

K. O’Shea and R. Nash, “An introduction to convolutional neural networks,” arXiv preprint, arXiv:1511.08458, 2015.

Emotify Dataset. [Online]. Available: https://www2.projects.science.uu.nl/memotion/emotifydata/.

A. Lykartsis, A. Pysiewicz, H. von Coler, and S. Lepa, “The emotionality of sonic events: testing the Geneva Emotional Music Scale (GEMS) for popular and electroacoustic music,” in Proc. 3rd Int. Conf. on Music & Emotion (ICME3), 2013.

MathWorks, “Spectrograms in MATLAB: Documentation,” [Online]. Available: https://www.mathworks.com/help/signal/ref/spectrogram.html.

Google Creative Lab, “Teachable Machine,” [Online]. Available: https://teachablemachine.withgoogle.com/.

Posted

2025-09-26