wave-reader

WAVE audio stream reader

npm install wave-reader
16 downloads in the last month

Installation

npm install wave-reader

License

BSD

Usage

var FS = require('fs');
var WaveReader = require('wave-reader');

var reader = new WaveReader({ frameDuration: 60 });
reader.on('data', function (data, offset, length) {
  /* audio frame sample data */
});
reader.on('format', function (format) {
  /* format info */
});
reader.on('chunk', function (id, data) {
  /* unknown subchunk id and data `Buffer` */
});
reader.on('end', function () {
  /* done */
});

var stream = FS.createReadStream("gangnam-style.wav");
reader.readStream(stream)
npm loves you