I finally figured this out using the fluent-ffmpeg library. Here is my code.
var ffmpeg = require('fluent-ffmpeg'); var track = './source.mp3';//your path to source file ffmpeg(track) .toFormat('wav') .on('error', function (err) { console.log('An error occurred: ' + err.message); }) .on('progress', function (progress) { // console.log(JSON.stringify(progress)); console.log('Processing: ' + progress.targetSize + ' KB converted'); }) .on('end', function () { console.log('Processing finished !'); }) .save('./hello.wav');//path where you want to save your file
Yatender singh
source share