Yaafe – audio features extraction

Yaafe is an audio features extraction toolbox.

Easy to use
The user can easily declare the features to extract and their parameters in a text file. Features can be extracted in a batch mode, writing CSV or H5 files. The user can also extract features with Python or Matlab.
Efficient
Yaafe automatically identifies common intermediate representations (spectrum, envelope, autocorrelation, …) and computes them only once. Extraction is processed block per block so that arbitrarily long files can be processed, and memory occupation is low.

If you wonder about the Yaafe acronym, it’s just Yet Another Audio Feature Extractor.

Download

Yaafe‘s source code is released under the terms of the GNU LGPLv3 License. Yaafe source code compiles on Linux and MacOsX platforms.

Download current release: yaafe-v0.64.tgz.

View all releases: Sourceforge project’s website

1. Installing Yaafe

1.1. Getting Yaafe

You can download Yaafe source code, yaafe-v?.tgz, from the project’s home page: http://yaafe.sourceforge.net.

1.2. Getting Dependencies

Yaafe source code should compile on linux and MacOsX platform, and uses CMake as compilation tool.

Yaafe requires thirdparty libraries to enable specific features. Some of these library may already be available on your system.

The argtable library is required.

Depending on optional features you want to use, other librairies may be used:

  • libsndfile: enable reading WAV files format (highly recommanded)
  • libmpg123: enable reading MP3 audio files
  • HDF5 >= 1.8: enable H5 output format
  • liblapack: enable some audio features (LSF)
  • FFTW3: use FFTW instead of Eigen for FFT computations (pay attention to licensing issues when linking with the GPL FFTW3 library).

To use the yaafe.py script you need Python >= 2.5, and the numpy package.

1.2.1. Debian/Ubuntu packages

The above dependencies can be installed using the following debian/ubuntu packages:

cmake: cmake cmake-curses-gui
argtable2: libargtable2-0 libargtable2-dev
libsndfile: libsndfile1 libsndfile1-dev
libmpg123: libmpg123-0 libmpg123-dev
lapack: liblapack-dev
hdf5: libhdf5-serial-dev libhdf5-serial-1.8.4
fftw3: libfftw3-3 libfftw3-dev

To get all those packages with apt-get:

> sudo apt-get install cmake cmake-curses-gui libargtable2-0 libargtable2-dev libsndfile1 libsndfile1-dev libmpg123-0 libmpg123-dev libfftw3-3 libfftw3-dev liblapack-dev libhdf5-serial-dev libhdf5-serial-1.8.4

1.3. Building on Unix/MacOsX

Once previous libraries are installed (some may have been locally installed in <lib-path>), you can compile with the following steps:

1.3.1. 1. Create build directory and change to it:

> mkdir build
> cd build

1.3.2. 2. Start CMake and set options:

> ccmake -DCMAKE_PREFIX_PATH=<lib-path> -DCMAKE_INSTALL_PREFIX=<install-path> ..

The CMAKE_PREFIX_PATH option allows to specify a directory where Cmake looks for thirdparty libraries (lib/ and include/ directories). Additional options can also be used to define the location of a particular library: SNDFILE_ROOT, MPG123_ROOT, ARGTABLE2_ROOT, HDF5_ROOT, MATLAB_ROOT,FFTW3_ROOT.

ccmake starts an interactive gui which enables you to control various build options.

Several options can be set to control Yaafe build:

  • WITH_FFTW3: enable use of FFTW to compute Fast Fourier transforms
  • WITH_HDF5: enable HDF5 output format
  • WITH_LAPACK: enable some audio features (LSF)
  • WITH_MATLAB_MEX: enable building of matlab mex to extract features within Matlab environment.
  • WITH_MPG123: enable read audio from MP3 files
  • WITH_SNDFILE: enable read audio from WAV files (enabled by default)
  • WITH_TIMERS: enable timers for debugging purpose (if enabled, the yaafe-engine program displays cpu time used by each component).

Those options can be set interactively within the ccmake gui, or can be set passing -DWITH_XXX=ON -DWITH_XXX=OFF arguments to the cmake orccmake programs.

1.3.3. 3. Build and install:

> make
> make install

1.3.4. 4. Setting your environment

You should find the following directories under your installation path:

INSTALL_DIR/bin/                # scripts and binaries
INSTALL_DIR/include/            # C++ headers to develop new components or integrate Yaafe in your application
INSTALL_DIR/lib/                # dynamic libraries
INSTALL_DIR/matlab/             # matlab scripts, and mex if WITH_MATLAB_MEX was enabled
INSTALL_DIR/python_packages/    # Python part of Yaafe
INSTALL_DIR/yaafe_extensions/   # Yaafe extensions dir

You must set your YAAFE_PATH environment var to the “yaafe_extensions” dir so that yaafe can find available features:

export YAAFE_PATH=$INSTALL_DIR/yaafe_extensions

To easily use Yaafe, you should set the following environment vars:

export PATH=$PATH:$INSTALL_DIR/bin
# on MacOsX replace LD_LIBRARY_PATH => DYLD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTALL_DIR/lib
export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/python_packages

if you use Matlab, you can set your MATLABPATH var:

export MATLABPATH=$MATLABPATH:$INSTALL_DIR/matlab

Note:

error: ‘push_back’ was not declared in this scope, and no declarations were found by argument-
dependent lookup at the point of instantiation [-fpermissive]

1.The above error can also be fixed by editing the Yaafe source file src_cpp/yaafe-core/Ports.hand replacing the references push_back with this->push_back.

2.The yaafe.py script defined in Install_Dir/bin should have all the permissions to execute.Otherwise it will give the following error,

ERROR: cannot load yaafe packages: No module named yaafelib

How to install Hbase in standalone mode

HBase is an open source, non-relational, distributed database modeled after Google’s BigTable and written in Java and runs on top of HDF (Hadoop Distributed Filesystem), providing BigTable-like capabilities for Hadoop.

In synopsis, HBase tables are like those in an RDBMS, only cells are versioned, rows are sorted, and columns can be added on the fly by the client as long as the column family they belong to preexists.

hbase

Installation:
Download a stable release from an Apache Download Mirror and unpack it on your local filesystem.For example:                    % tar xzf hbase-x.y.z.tar.gz

As with Hadoop, you first need to tell HBase where Java is located on your system. If you have the JAVA_HOME environment variable set to point to a suitable Java installation, then that will be used, and you don’t have to configure anything further.

Otherwise, you can set the Java installation that HBase uses by editing HBase’s conf/hbase-env.sh and specifying the JAVA_HOME variable to point to version 1.6.0 of Java.

HBaseFor convenience, add the HBase binary directory to your command-line path.For example:
% export HBASE_HOME=/home/hbase/hbase-x.y.z
% export PATH=$PATH:$HBASE_HOME/bin

To get the list of HBase options, type:
% hbase
Usage: hbase <command> where <command> is one of:
shell                    run the HBase shell
master                run an HBase HMaster node
regionserver       run an HBase HRegionServer node
zookeeper          run a Zookeeper server
rest                     run an HBase REST server
thrift                    run an HBase Thrift server
avro                    run an HBase Avro server
migrate               upgrade an hbase.rootdir
hbck                   run the hbase ‘fsck’ tool
or
CLASSNAME     run the class named CLASSNAME
Most commands print help when invoked w/o parameters.

Test Drive:
To start a temporary instance of HBase that uses the /tmp directory on the local file-system for persistence, type:
% start-hbase.sh
This will launch a standalone HBase instance that persists to the local filesystem.

To administer your HBase instance, launch the HBase shell by typing:
% hbase shell
HBase Shell; enter ‘help<RETURN>’ for list of supported commands.
Type “exit<RETURN>” to leave the HBase Shell
Version: 0.89.0-SNAPSHOT, ra4ea1a9a7b074a2e5b7b24f761302d4ea28ed1b2, Sun Jul 18
15:01:50 PDT 2010 hbase(main):001:0>