MACHINE LEARNING
BASED MUSIC GENRE
CLASSIFICATION
Name: Deepanshu Aswal
SECTION:- J
Student ID:- 20011537
Univ. R.no: 2018014
2
INTRODUCTION
• -Genre classification is important for many real-world applications. As the quantity of music
being released daily continues to sky-rocket, especially on internet platforms such as
Soundcloud6
and Spotify.
• -it is a Deep learning project to automatically classify different musical genres from audio
files. We will classify these audio files using their low-level features of frequency and time
domain.
• we need a dataset of audio tracks having similar size and similar frequency range. GTZAN
genre classification dataset is the most recommended dataset for the music genre
classification project and it was collected for this task only.
3
MOTIVATION
• Over the past decade, large collections of music are increasingly available on various
platforms. Therefore, tasks such as music discovery, navigation, and organization have
become progressively harder for humans without the help of automated systems. Extensive
research effort has been invested in music information retrieval at the intersection of signal
processing, music modelling and machine learning.
• Today in 21st
century, the usage of audio music files has grown enormously. With large
amounts of audio files comes the need to classify the files to organize them without human
intervention. Automatic music genre recognition (MGR) is a sub field of music information
retrieval (MIR). Algorithms use features of the sound files found in the sound waves to
classify the files. This project is aimed at developing such a solution to implement genre
classification of audio files.
4
TYPES OF MUSIC GENRE COVERED
• A music genre is a classification system that classifies music into
different styles. It’s the art of incorporating instrumental and vocal
tones in a structured manner that gives the music its distinctive
character. The 10 Genres are :
 Blues Classical
 Country Disco
 Hip-hop Jazz
 Metal Pop
 Reggae Rock
5
MUSIC GENRE CLASSIFICATION
• Music Genre classification is an important task with many real-world
applications.
• Audio processing is one of the most complex tasks in data science as
compared to image processing and other classification techniques. One
such application is music genre classification which aims to classify the
audio files in certain categories of sound to which they belong. The
application is very important and requires automation to reduce the
manual error and time because if we have to classify the music manually
then one has to listen out each file for the complete duration. So, to
automate the process we use Machine learning and deep learning
algorithms.
WORKING
6
7
CODE
Python Libraries Used in the project
1. Python_Speech_Features- This library provides common speech features for ASR
including MFCCs and filterbank energies.
2. Scipy.io – SciPy in python is an open-source library which allows users to manipulate the
data and visualize the data using a wide range of high-level Python commands. SciPy is
built on the Python NumPy extention. Here, we are using SCIPY.IO.WAVFILE which opens
a wav file and returns the Sample rate(in samples/sec) and data from LPCM WAV file.
3. Tempfile- Is a Python module used in a situation, where we need to read multiple files,
change or access the data in the file, and gives output files based on the result of
processed data. Each of the output files produced during the program execution was no
longer needed after the program was done.
4. DATASET USED: For this project we need a dataset of audio tracks having similar size and
similar frequency range. GTZAN genre classification dataset is the most
recommended dataset for the music genre classification project. It consists of 1000
audio files each having 30 seconds duration.
9
ALGORITHMS USED
• So basically, this project is to classify the audio files in certain categories of
sound to which they belong. The application is very important and requires
automation to reduce the manual error and time because if we have to
classify the music manually then one has to listen out each file for the
complete duration. So, To automate the process we use Machine learning and
deep learning algorithms.
• K-Nearest Neighbour -
• KNN is a machine learning algorithm used for regression, and classification. It
is also known as the lazy learner algorithm. It simply uses a distance-based
method to find the K number of similar neighbours to new data and the class
in which the majority of neighbours lies, it results in that class as an output.
Now let us get our system ready for project implementation.
10
CHALLENGES
• Machine Learning Algorithms were new to me.
• Didn’t have prior knowledge of python programming language.
• Project was not working fine when I tried it on Google Colab.
• Many errors arised during the project making.
11
LIMITATIONS
• Only 100 audio files are available per genre and the files do not capture the
variation in each of the genre.
• Most of the modern-day music is a fusion of multiple genre like blues + classical
etc. but the dataset used have pure genre labels instead of fusion genre.
• The GITZAN dataset and the genre are applicable for only western music and there
are many other styles like Indian, Asian etc., which are not in the scope of the
project.
• Lack of access to direct audio files of Million song tracks limit our ability to extract
the features.
Conclusion
RESULT:
• In this music genre classification project, we have developed a classifier on
audio files to predict its genre. We work through this project on GTZAN music
genre classification dataset. This tutorial explains how to extract important
features from audio files.
FUTURE SCOPE:
• Music Recommendation Engine: Once the model understands what every
user likes, then it can build a set of similar user and recommended songs that
similar users would prefer to listen.
• Song Identifier: We can create an app that can identify music, movies,
advertising, and television shows, based on a short sample played and using
the microphone on the device. Based on recognition of the audio track we can
provide the lyrics.
13
-THANK YOU

musicGenreClassificationUsingMachineLearning.pptx

  • 1.
    MACHINE LEARNING BASED MUSICGENRE CLASSIFICATION Name: Deepanshu Aswal SECTION:- J Student ID:- 20011537 Univ. R.no: 2018014
  • 2.
    2 INTRODUCTION • -Genre classificationis important for many real-world applications. As the quantity of music being released daily continues to sky-rocket, especially on internet platforms such as Soundcloud6 and Spotify. • -it is a Deep learning project to automatically classify different musical genres from audio files. We will classify these audio files using their low-level features of frequency and time domain. • we need a dataset of audio tracks having similar size and similar frequency range. GTZAN genre classification dataset is the most recommended dataset for the music genre classification project and it was collected for this task only.
  • 3.
    3 MOTIVATION • Over thepast decade, large collections of music are increasingly available on various platforms. Therefore, tasks such as music discovery, navigation, and organization have become progressively harder for humans without the help of automated systems. Extensive research effort has been invested in music information retrieval at the intersection of signal processing, music modelling and machine learning. • Today in 21st century, the usage of audio music files has grown enormously. With large amounts of audio files comes the need to classify the files to organize them without human intervention. Automatic music genre recognition (MGR) is a sub field of music information retrieval (MIR). Algorithms use features of the sound files found in the sound waves to classify the files. This project is aimed at developing such a solution to implement genre classification of audio files.
  • 4.
    4 TYPES OF MUSICGENRE COVERED • A music genre is a classification system that classifies music into different styles. It’s the art of incorporating instrumental and vocal tones in a structured manner that gives the music its distinctive character. The 10 Genres are :  Blues Classical  Country Disco  Hip-hop Jazz  Metal Pop  Reggae Rock
  • 5.
    5 MUSIC GENRE CLASSIFICATION •Music Genre classification is an important task with many real-world applications. • Audio processing is one of the most complex tasks in data science as compared to image processing and other classification techniques. One such application is music genre classification which aims to classify the audio files in certain categories of sound to which they belong. The application is very important and requires automation to reduce the manual error and time because if we have to classify the music manually then one has to listen out each file for the complete duration. So, to automate the process we use Machine learning and deep learning algorithms.
  • 6.
  • 7.
  • 8.
    Python Libraries Usedin the project 1. Python_Speech_Features- This library provides common speech features for ASR including MFCCs and filterbank energies. 2. Scipy.io – SciPy in python is an open-source library which allows users to manipulate the data and visualize the data using a wide range of high-level Python commands. SciPy is built on the Python NumPy extention. Here, we are using SCIPY.IO.WAVFILE which opens a wav file and returns the Sample rate(in samples/sec) and data from LPCM WAV file. 3. Tempfile- Is a Python module used in a situation, where we need to read multiple files, change or access the data in the file, and gives output files based on the result of processed data. Each of the output files produced during the program execution was no longer needed after the program was done. 4. DATASET USED: For this project we need a dataset of audio tracks having similar size and similar frequency range. GTZAN genre classification dataset is the most recommended dataset for the music genre classification project. It consists of 1000 audio files each having 30 seconds duration.
  • 9.
    9 ALGORITHMS USED • Sobasically, this project is to classify the audio files in certain categories of sound to which they belong. The application is very important and requires automation to reduce the manual error and time because if we have to classify the music manually then one has to listen out each file for the complete duration. So, To automate the process we use Machine learning and deep learning algorithms. • K-Nearest Neighbour - • KNN is a machine learning algorithm used for regression, and classification. It is also known as the lazy learner algorithm. It simply uses a distance-based method to find the K number of similar neighbours to new data and the class in which the majority of neighbours lies, it results in that class as an output. Now let us get our system ready for project implementation.
  • 10.
    10 CHALLENGES • Machine LearningAlgorithms were new to me. • Didn’t have prior knowledge of python programming language. • Project was not working fine when I tried it on Google Colab. • Many errors arised during the project making.
  • 11.
    11 LIMITATIONS • Only 100audio files are available per genre and the files do not capture the variation in each of the genre. • Most of the modern-day music is a fusion of multiple genre like blues + classical etc. but the dataset used have pure genre labels instead of fusion genre. • The GITZAN dataset and the genre are applicable for only western music and there are many other styles like Indian, Asian etc., which are not in the scope of the project. • Lack of access to direct audio files of Million song tracks limit our ability to extract the features.
  • 12.
    Conclusion RESULT: • In thismusic genre classification project, we have developed a classifier on audio files to predict its genre. We work through this project on GTZAN music genre classification dataset. This tutorial explains how to extract important features from audio files. FUTURE SCOPE: • Music Recommendation Engine: Once the model understands what every user likes, then it can build a set of similar user and recommended songs that similar users would prefer to listen. • Song Identifier: We can create an app that can identify music, movies, advertising, and television shows, based on a short sample played and using the microphone on the device. Based on recognition of the audio track we can provide the lyrics.
  • 13.