Bioacoustics Workbench audio tools. Contains the audio, spectrogram, and caching tools for the Bioacoustics Workbench project.

Build Status Dependency Status Code Climate Test Coverage Documentation Status Documentation


Add this line to your application's Gemfile:

gem 'baw-audio-tools', git: ''

And then execute:

$ bundle


You may need to install some additional tools for working with audio and images, and for processing long-running tasks.

  • ImageMagick is used by paperclip.
  • WavPack is used to expand compressed .wv files.
  • SoX is used to create spectrograms and resample audio.
  • shnTool is a tool for quickly segmenting large .wav files.
  • mp3splt is a tool for quickly segmenting large .mp3 files.
  • ffmpeg is used for audio conversion and gathering audio file information.
  • wav2png is used to generate waveform images.
  • wac2wav is used to convert from .wac to .wav.
  • redis is used by Resque to manage long-running tasks.

Audio tools from apt: imagemagick, wavpack, sox, shntool, mp3splt. Ffmpeg is installed from a binary, and wav2png can be built from source.

sudo apt-get install make g++ libsndfile1-dev libpng++-dev libpng12-dev libboost-program-options-dev imagemagick wavpack libsox-fmt-all sox shntool mp3splt libav-tools

Download, build and install wav2png:

cd ~/Downloads
git clone
make -C ./wav2png/build all
sudo mv ./wav2png/bin/Linux/wav2png /usr/local/bin/

Download and install latest ffmpeg:

cd ~/Downloads
mkdir ./ffmpeg
wget -O download-ffmpeg.tar.xz
tar -xf download-ffmpeg.tar.xz  -C ./ffmpeg/ --strip=1
sudo mv ./ffmpeg/ffmpeg /usr/local/bin/ffmpeg
sudo mv ./ffmpeg/ffprobe /usr/local/bin/ffprobe

Download, build, and install wac2wav:

cd ~/Downloads
wget -O
cd wac2wavcmd-master
sudo cp ./wac2wavcmd /usr/local/bin/