Skip to content

weaviate-tutorials/DEMO-classification-audio-genre

Repository files navigation

Audio Genre Classifier

This project's origin is here.

This Demo demonstrates the usage of weaviate img2vec module, Which is a module that converts images to vectors using neural network and then allow us to perform various operations. More information for this module can be found here .

adio_genre.mp4

This example uses HTML,CSS,Js for frontend and Flask for the backend.

Prerequisites

Make sure you have installed all of the following prerequisites on your development machine:

  1. Download & install Docker Desktop
  2. Download & install Python

Setup instructions

Follow the following steps to reproduce the example

  1. Download the dataset from here and paste it in the directory where add_data.py file exists
  2. Run the following command to run the weaviate docker file
sudo docker-compose up -d
  1. Run the following command in directory to install all required dependencies
pip install -r requirements.txt
  1. Run the following command to add all the data objects,you can change path of dataset at line 115 if necessary. You can also decrease the number of data objects at line 119 so that it takes less time.
python add_data.py
  1. After adding data and installing all modules run the following command and navigate to http://127.0.0.1:5000/ to perform searching. You can try uploading some sample audios from 'sample test audios' folder.
python upload.py

Usage instructions

(TO DO)

Note: This demo supports the .wav extensions. If you want to use .mp3 extensions as well, You need to download a specific library according to your OS from here: https://github.com/librosa/librosa#audioread-and-mp3-support

Dataset license

The Dataset used for this example can be found here
The license of the datset used is UNKNOWN.
It is data of spectrogram of audios of 10 categories, namely 'blues', 'classical', 'country', 'disco', 'hiphop', 'jazz', 'metal', 'pop', 'reggae', and 'rock'.
Note: These spectrograms were created from audios of length 30 seconds, So they will best classify audios with similar length.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published