This module provides Vorbis Encoder and Decoder classes compatible with node-ogg
streams.
node-vorbis comes bundled with its own copy of libvorbis, so
there's no need to have the library pre-installed on your system.
Simply compile and install node-vorbis using npm:
$ npm install vorbisvarfs=require('fs');varogg=require('ogg');varvorbis=require('vorbis');varfile=__dirname+'/Hydrate-Kenny_Beltrey.ogg';varod=newogg.Decoder();od.on('stream',function(stream){varvd=newvorbis.Decoder(stream);// the "format" event contains the raw PCM formatvd.on('format',function(format){// send the raw PCM data to stdoutvd.pipe(process.stdout);});// an "error" event will get emitted if the stream is not a Vorbis stream// (i.e. it could be a Theora video stream instead)vd.on('error',function(err){// maybe try another decoder...});});fs.createReadStream(file).pipe(od);See the examples directory for some more example code.