sirens-ruby

sirens-ruby is a ruby extension for Sirens, a library for segmentation, indexing, and retrieval of environmental and natural sounds. Sirens is currently under development and is only ready to use for feature extraction and segmentation. Please check back for updates on retrieval and indexing.

Requirements

To install sirens-ruby, it is necessary to have these two libraries:

  1. FFTW
  2. libsndfile
  3. Sirens

Additionally, sirens-ruby has the following gem dependencies, which RubyGems should take care of:

  1. rake-compiler
  2. jeweler
  3. rice

Installation

To install sirens-ruby, type:

gem sources -a http://gems.github.com
sudo gem install plant-sirens

If you are using OSX, Rice has some issues with building in some environments. To fix this, you need to specify which architecture (Intel or PowerPC) to use when you install the gem, e.g.:

sudo bash
ARCHFLAGS="-arch i386" gem install plant-sirens -- --build-flags

replacing i386 with ppc if you are using a PowerPC machine.

Local installation

If you do not have root access, you may have some problems, as the Rice gem uses a nonstandard installation procedure that attempts to install the library in a path outside where the gem is installed. There may be an easier workaround for this by passing some options to rubygems, but the only solution I've found so far is to install Rice manually from source before installing sirens-ruby. If you are installing on OSX, please see this ticket for tips on installing from source.

FFTW and libsndfile can both be installed locally by changing the prefix path in their configure steps, e.g.

./configure --prefix=$HOME/local

Sirens can be installed similarly:

scons install --prefix=$HOME/local

After installing Rice from source, if you have not installed it as a gem, you may have troubles with gem dependencies when installing sirens-ruby. To get around this, you can ignore gem dependencies:

gem --ignore-dependencies install plant-sirens

If you have any problems with this process, please submit an issue and I'll try to help as soon as possible.

Usage

RDoc documentation and a full tutorial is to come, but for now, you can check out some example code in the examples/ directory to get an idea of how the extension works.

Copyright

Copyright 2009 Brandon Mechtley. Sirens-ruby is licensed under the MIT License. See LICENSE for details.