You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
waveform.js-compatible JSON representation of the audio file
PNG rendering of the waveform
This is a Node.js module that wraps the waveform command
line interface. The C code is bundled
from that repository, so if you want to file an issue with or fork the C code,
go to the waveform repository.
Usage
At least one of the options transcode, waveformjs or png is required as
output destination.
varwaveform=require('waveform');waveform(audiofile,{// options'scan': false,// whether to do a pass to detect duration// transcoding optionstranscode: "outputfile.mp3",// path to output-file, or - for stdout as a Bufferbitrate: 320,// audio bitrate in kbpsformat: "name",// e.g. mp3, ogg, mp4codec: "name",// e.g. mp3, vorbis, flac, aacmime: "mimetype",// e.g. audio/vorbis'tag-artist': "artistname",// artist tag'tag-title': "title",// title tag'tag-year': 2000,// year tag'tag-comment': "comment",// comment tag// waveform.js optionswaveformjs: "outputfile.json",// path to output-file, or - for stdout as a Buffer'wjs-width': 800,// width in samples'wjs-precision': 4,// how many digits of precision'wjs-plain': false,// exclude metadata in output JSON (default off)// png optionspng: "outputfile.png",// path to output-file, or - for stdout as a Buffer'png-width': 256,// width of the image'png-height': 64,// height of the image'png-color-bg': '00000000',// bg color, rrggbbaa'png-color-center': '000000ff',// gradient center color, rrggbbaa'png-color-outer': '000000ff',// gradient outer color, rrggbbaa},function(err,buf){// done});
Installation
Install libgroove dev package.
Only the main library is needed. Packages are available for common
package managers.
Install libpng and zlib dev packages.
npm install waveform
About
simultaneously transcode audio and generate visuals - Node.js module