node-wav
Reader
and Writer
streams for Microsoft WAVE audio files
This module offers streams to help work with Microsoft WAVE files.
Installation
Install through npm:
$ npm install wav
Example
Here's how you would play a standard PCM WAVE file out of the speakers using
node-wav
and node-speaker
:
var fs = require('fs');
var wav = require('wav');
var Speaker = require('speaker');
var file = fs.createReadStream('track01.wav');
var reader = new wav.Reader();
reader.on('format', function (format) {
reader.pipe(new Speaker(format));
});
file.pipe(reader);
API
Reader class
Writer class
FileWriter class