Saturday, 20 December 2014

Introducing BioAcoustica

In a recent blog post I explained some of the work that had been done on the Wildlife Sound Database. That project has now been developed further to include annotations of audio samples and integrated analysis functions. Given the expansion of the project it has also been renamed BioAcoustica.

Recordings of wildlife sound often include sections of spoken introductory metadata detailing where and when the recording was made, the identification of the species being recorded, etc. They often also containing sections of extraneous noise, such as passing cars, mechanical noise caused by the recording equipment, etc. These sections of the recording should be ignored by any analyses performed on the recording.

The aim of the annotation function of BioAcoustica is to allow the usable sections of audio to be clearly marked as in the waveform below.

Call of the cicada Platypleura haglundi annotated to show regions of voice introduction (blue), extraneous noise (red) and the call of the cicada (green, two overlapping regions). (Source: http://bio.acousti.ca/node/11778)

By default BioAcoustica will perform a set of standard analyses on regions annotated as being calls of the organism.

Spectrogram from the short section of the call of Platypleura haglundi from the above annotation example.


Analysis makes use of infrastructure provided by the EU funded BioVeL (Biodiversity Virtual e-Laboratory) project. Requests for analysis are sent to the BioVeL portal which manages the queuing and execution of analysis tasks.

One of the aims of BioAcoustica is to provide an annotated dataset that allows for usable sections of calls to be instantly available to researchers working on bioacoustics, automated identification, or any other project. For this reason we are currently working on a R package that will allow for the querying of annotations, download of the files, and extraction of relevant regions for use in your own analyses. We will also document the API we are using so it can expanded to other analysis and development environments.

Tuesday, 2 December 2014

Getting the seewave R package installed on Mac OS X Yosemite

The seewave package for R first requires you to install the fftw library (on your system, not in R), instructions for this can be found here: Installing fftw on Mac OS X Yosemite.

At present it is not possible to use install.packages() to download seewave on the 3.1 branch of R. To see what version(s) of R you have on your system run the following command from the Terminal:

ls -l /Library/Frameworks/R.framework/Versions/

This will give an output similar to:

drwxrwxr-x  6 root  admin  204  2 Dec 11:31 3.0
drwxrwxr-x  6 root  admin  204  3 Nov 16:50 3.1
lrwxr-xr-x  1 root  admin    3  2 Dec 11:31 Current -> 3.0


This shows that my system has two versions of R, 3.0 and 3.1, installed and the current default version is 3.0. If you do not have 3.0 installed you can download R version 3.0 branch from here.

To set the current version of R to 3.0 if you have it already installed you just need to change the symbolic link 'Current' to the correct version:

cd /Library/Frameworks/R.framework/Versions 
ln -sfn 3.0 Current

You can then use install.packages() in R to install the seewave package:

install.packages(c("fftw","tuneR","rgl","rpanel"), repos="http://cran.at.r-project.org/")

install.packages("seewave", repos="http://cran.at.r-project.org/")

Installing fftw on OS X Yosemite

FFTW is a C library for Discrete Fourier Transforms. The following instructions allow you to install the library on Mac OS X Mavericks. All commands are run from Terminal.

First of all ensure the xCode Command Line Tools are installed:

xcode-select --install

Download the fftw source and change to its directory.

Configure, make and install the library (no need to use sudo).  In this example we enable both floating point and threads.

./configure --enable-float --enable-threads

(If this gives an error that the 'compiler cannot create executables' you will likely need to accept Apple's terms and conditions for xCode)

make

make install
 

Mac OS X: compiler cannot create executables

This issue is often due to you not having accepted Apple's latest terms and conditions. Running the following line from the command line will guide you through this process:

sudo gcc -v

ShareThis

Copyright