A Python library for Echonest's Echoprint music identification service.
Unlike the official library, it does not need to save anything to disk -- a list of samples can be passed directly to the library.
First, you need to install the build dependencies. On Ubuntu/Debian, run:
$ sudo apt-get install python-dev libboost-dev libtag1-dev ffmpeg
On OS X, you need to install Homebrew, and run:
$ brew install boost taglib
Then as root or in a virtualenv:
python setup.py install
import echoprint
import requests
d = echoprint.codegen([0.0, 0.0, ...])
d['api_key'] = YOUR_KEY
print requests.get('http://developer.echonest.com/api/v4/song/identify', d).content
echoprint.codegen()
takes a list of floating point PCM data sampled at 11025 Hz and mono. It optionally takes a second integer argument to hint the server on where the sample is taken from in the original file if known.
For a more complete example, see examples/identify.py
. requests is required:
pip install requests
$ pip install nose
$ nosetests