Skip to content

aynakeya/SongRecogn

Repository files navigation

SongRecogn

This is a song recognition program using shazam's algorithm.

Paper

If you want to see a explaination of how it works, check this out(chinese ver. only): Here

Setup

Make sure you install all dependency in the requirements.txt

Change Config: Change the sqlalchemy url in srModule/Config to your own database.

Create tables by using createDatabase.py

python createDatabase.py

Change the config of mysql to reach a higher performance

Quickstart

cd SongRecogn
python SongRecogn.py

waiting for program connect to the data base.

then you will see a console.

add-audio : add a audio to the database
           usage :add-audio song/lingyu.mp3
add-dir : add audio from a directory
         usage :add-audio song
recognize : recognzie a audio sample from file
           usage :recognzie sample/lingyu_01.mp3
help : show help
quit : Quit

type the command to use the console.

open console add song recognzie

If you want to use it directly in script.

from srModule import Console
Console.addAudio("song/linagyu.mp3")
Console.recognizeAudio("songp/liangyu_06.mp3")
Console.addAudioFromDir("song")

ABC

3 sec of sample audio already have a very higher accuracy.

The longersample audio are, the longer time it costs for recognizing.

Thanks

Thanks:

dejavu

Change Log

2019/4/4: Increase inserting speed

2019/4/6: Fix potential memory issue + add mutliprocessing support in recognizing.

About

A Song Recognition Program using Shazam Algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages