# SongRecogn **Repository Path**: keyestore/SongRecogn ## Basic Information - **Project Name**: SongRecogn - **Description**: 一个使用 Shazam 算法的歌曲识别程序 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-24 - **Last Updated**: 2026-04-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README SongRecogn ========== This is a song recognition program using shazam's algorithm. [Paper](http://www.ee.columbia.edu/~dpwe/papers/Wang03-shazam.pdf) If you want to see a explaination of how it works, check this out(chinese ver. only):[ Here](https://www.bilibili.com/read/readlist/rl54978) ## 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](plot/c2.JPG) ![add song](plot/c6.JPG) ![recognzie](plot/c9.JPG) 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](https://github.com/worldveil/dejavu) ## Change Log 2019/4/4: Increase inserting speed 2019/4/6: Fix potential memory issue + add mutliprocessing support in recognizing.