All Projects → wblgers → music_retrieve

wblgers / music_retrieve

Licence: other
A music retrieve demo in Python

Programming Languages

python
139335 projects - #7 most used programming language

music_retrieve

A music retrieve demo in Python

0. Setup Environment

This project is running in Python3.x, and please enusre following packages are installed:

  • librosa
  • pyaudio
  • wave
  • numpy
  • dtw

1. How to run

(1) Put the music library in folder music_base, during which the algorithm will recognize the playing music and output a similiar music, the supported format is .wav.

(2) Run script librosa_music.py, a music retrieve database is created and stored as beatDatabase.npy.

(3) Make sure the microphone on your computer works fine. Run script librosa_main.py, and in the meanwhile play a song on your smart phone, the mactched song can be recognized in 20 seconds.

2. Underlying principle

Music signals in library->beat time extraction->beat feature->beat database
                                                                    |
                                                                    |
Music signals in the air->beat time extraction->beat feature->sequence match using dtw
->output the song with minimum distance

3. Reference

http://librosa.github.io/librosa/generated/librosa.beat.beat_track.html#librosa.beat.beat_track https://labrosa.ee.columbia.edu/projects/beattrack/

4. Blog for this project

用Python实现一个简易的“听歌识曲”demo(一)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].