Journal of Applied Informatics and Computing (Jul 2024)

Musical Instrument Classification using Audio Features and Convolutional Neural Network

  • Gst. Ayu Vida Mastrika Giri,
  • Made Leo Radhitya

DOI
https://doi.org/10.30871/jaic.v8i1.8058
Journal volume & issue
Vol. 8, no. 1
pp. 226 – 234

Abstract

Read online

This research classifies acoustic instruments using Convolutional Neural Network (CNN). We utilize a dataset from Kaggle containing audio recordings of piano, violin, drums, and guitar. The training set consists of 700 guitar, percussion, violin, and 528 piano samples. The test set contains 80 samples of each instrument. Features such as Mel spectrograms, MFCCs, and other spectral and non-spectral characteristics are extracted using the Librosa package. Three feature sets—spectral-only, non-spectral-only, and a combined set—are employed to evaluate the efficacy of CNN models. Various CNN configurations are tested by adjusting the number of convolutional filters, learning rates, and epochs. The combined feature set achieves the highest performance, with a validation accuracy of 71.8% and a training accuracy of 76.9%. In comparison, non-spectral features achieve a validation accuracy of 68.4%, and spectral-only features achieve 69.3%. These findings highlight the benefits of using a comprehensive feature set for accurate classification.

Keywords