Team 201612-44 for Big Data Analytics
Reva Abramson ra2659 CVN
https://www.youtube.com/watch?v=BucCPu1yZrA
##Overview
Without an ear for music it is difficult to play the songs you like correctly. This Spark and Python project uses machine learning to recognize chords.
##Usage
- Download annotated (labled with chords) data from isophonics.net (
*.labfiles) - Find the matching audio file on youtube and convert it to mp3 format and name it the same (except for the extension)
- put all this data in a
musicdirectory - An example is hello-goodbye.lab and the corresponding hello-goodbye.mp3 in this repository
- install
Spark over Hadoop - install the Python library librosa
pip install librosa - install ffmpeg
brew install ffmpg - run
features.pyand direct the output to a file - the results should be in the format of the file
output.txtwhich is what Spark expects
- run
train.pyin the same directory as the output.txt file - a model will be created called
rf.model
- run
chordviewer.pyin the same directory as the mp3 song you want to predict and in the same directory as the modelrf.model - hardcode the name of the song in chordviewer.py line 41, or alternatively name your song upload.mp3
###Setting up the Web Server and CGI Application
- on a mac run
sudo apachectl startin order to start up your apache web server at localhost - navigate to
/private/etc/apache2/httpd.confand uncomment#loadmodule cgi - move the model
rf.modelandchordviewer.pyinto/Library/WebServer/CGI-Executables - move
index.htmlinto/Library/WebServer/Documents - navigate to localhost, upload a song, and the chords will be predicted!