Installing essentia for audio feature extraction

warning

This post is more than 5 years old. While math doesn't age, code and operating systems do. Please use the code/ideas with caution and expect some issues due to the age of the content. I am keeping these posts up for archival purposes because I still find them useful for reference, even when they are out of date!

Some notes on the installation of essentia a collection of c++ code with Python wrappers for audio feature extraction, following the essentia installation guide .

Getting the code

First, get the code from github-- essentia github . I do this in a local directory on my machine called ~/gitlocal so that I remember where the github repository is located:

$ cd ~/gitlocal
$ git clone https://github.com/MTG/essentia.git

This is a large amount of code, so, be patient as the code downloads and use a good internet connection if possible.

Install dependencies

Second, I make sure that all of the Ubuntu dependencies are installed using the following command:

$ sudo apt-get install build-essential libyaml-dev libfftw3-dev
$ sudo apt-get install libavcodec-dev libavformat-dev python-dev
$ sudo apt-get install libsamplerate0-dev libtag1-dev

I've divided the commands onto three lines for easier reading.

Python dependencies

Third, numpy and numpy-dev are required for the use of essentia from Python. I have previously installed these using pip as detailed elsewhere on the blog-- take a look if you need help.

Configure and compile

Fourth, we configure:

$ ./waf configure --mode=release --with-python  --with-examples --with-vamp

Note-- I removed the --with-cpptests flag in this configure command to avoid resulting errors.

Next, we compile:

$ ./waf

Fifth, we install using:

$ sudo ./waf install

Test it out...

Finally, I try importing the Python package to make sure that the install worked:

Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import essentia
>>> print essentia.__version__
2.1-beta2
>>> exit()

Looks good, essentia is installed.