Classifies musics and sounds into 4 emotions: happy, calm, angry or sad, depending on the music features, using Tensorflow.js.
The classification is based on a dataset of already classified sounds by danz1ka19.
- Download the Music-Emotion-Recognition repo.
- Create a "Dataset" folder at the root of the folder, and put the mp3 files you want to classify in it.
- Launch the
Feature-Extraction.py
script with the command line (might take few minutes if you have a lot of files).
py Feature-Extraction.py
- It generates an
Emotion_features.json
file at the root of the folder.
- Download this repo.
- Run
npm install
. - Place the generated
Emotion_features.json
file in thetoClassify
folder.
- Change the default options of the model in
scripts/classifier.ts
, at the declaration of theclassify()
function, or directly with the form (next step).
- Run with using
npm start
at the root of the project. - You can access the results in the console at
http://localhost:1234
, with Google Chrome. - You can also tune the model here, by entering your own parameters and pressing the "Classify" button. There is no checking for the values entered here so be careful.
- The results will appear in the console.
Development by Mathilde Buenerd.
Based on this dataset and feature extractor by danz1ka19.