wave-to-json
generate a waveform in json format
Installation
wave-to-json require sox
.
install it via brew
or apt
brew install sox
or
sudo apt-get install sox libsox-fmt-mp3
Usage by examples
convert mp3 file to json format
WaveToJson.new(SOURCE, DESTINATION, OPTIONS).generate
- Both channels
WaveToJson.new('test.mp3', 'test.json').generate
- Left channel
Generate from left channel
WaveToJson.new('test.mp3', 'test.json', channel: :left).generate
- Right channel
Generate json format from right channel
WaveToJson.new('test.mp3', 'test.json', channel: :right).generate
CLI Usage
$ wave_to_json generate song.mp3 waveform.json