Generate waveform data in JSON format from an audio file.
The generated JSON file is optimized for space. Thus, the precision is
sufficient but not the most precise. The generated JSON structure only contains
integers and not floats. Before getting passed to
Waveform.js, values should be divided by 128
.
waveform /path/to/my/audio.mp3 > waveform.json
This required sox and the soxi
binary which
should be included with the sox
distribution.
echo "deb http://apt.delatech.net/ squeeze main" >> /etc/apt/sources.list
curl https://raw.githubusercontent.com/delatech/gpg/master/delatech-public-key-sign.asc | apt-key add -
apt-get update
apt-get install sox libsox-fmt-mp3 waveform
brew tap delatech/delatech
brew install sox
brew install delatech/waveform
go get github.com/delatech/waveform
Based on work from Sunjin Lee.