Skip to content

Shazam-like web app that returns a set of similar audio tracks for an audio query. School project for course NI-VMM on FIT CTU.

Notifications You must be signed in to change notification settings

jstorm31/audio-similarity

Repository files navigation

Audio similarity

This project is a semestral work for course NI-VMM on FIT CTU. It is a Shazam-like app that returns a set of similar audio tracks for an audio query.

Project structure

  • server - web server
    • core - core module with different engine types - MFCC, Chromaprint with bit error similarity, Chromaprint with cross correlation similarity
    • app.py - Flask server wrapper exposing /search and /audiotracks/{filename} endpoints.
    • db.py - database construction script.
    • get_engine.py - function to initialize correct engine type. It has -e parameter to set an engine type (mfcc, chromaprint or chromaprint_cc) and -c parameter which will erase the database before constructing it.
  • client - client web React app
  • Jupyter notebook with prototypes

Running locally

The project consists of a python Flask server, MongoDB database and React web client. Everything runs in Docker containers, so Docker needs to be installed on the target system.

  1. Add .env file with all required environment variables into the root of project. A sample can be found in .env.example
  2. Make sure you have data folder with audiofiles (mp3, wav,..) created locally.
  3. Run make run which will build and start all docker containers
  4. Run make db to construct the reference database. It will take all audio files from the data folder.
  5. (optional) If you want to also use MFCCEngine, run make db_mfcc. Note it will last much longer than make db.

This will start the client web app on address localhost:3000 and the server on localhost:5000. You can record an audio or upload an audiofile in the client web app to search for similar tracks in the reference dataset.

Other useful commands can be found in the Makefile.

Example

example.png

About

Shazam-like web app that returns a set of similar audio tracks for an audio query. School project for course NI-VMM on FIT CTU.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published