baw-audio-tools

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

Installation

Add this line to your application's Gemfile:

gem 'baw-audio-tools', git: 'https://github.com/QutBioacoustics/baw-audio-tools.git'

And then execute:

$ bundle

Dependencies

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 https://github.com/beschulz/wav2png.git
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 http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.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 wac2wavcmd-master.zip https://github.com/QutBioacoustics/wac2wavcmd/archive/master.zip
unzip wac2wavcmd-master.zip
cd wac2wavcmd-master
make
sudo cp ./wac2wavcmd /usr/local/bin/