Skip to content

Instantly share code, notes, and snippets.

@alessioalex
Forked from TooTallNate/mp3player.js
Created June 17, 2014 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alessioalex/a20e98db4b73977562c0 to your computer and use it in GitHub Desktop.
Save alessioalex/a20e98db4b73977562c0 to your computer and use it in GitHub Desktop.
var fs = require('fs');
var lame = require('lame');
var Speaker = require('speaker');
fs.createReadStream(process.argv[2])
.pipe(new lame.Decoder())
.on('format', function (format) {
this.pipe(new Speaker(format));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment