Skip to content

Instantly share code, notes, and snippets.

@alessioalex
Forked from TooTallNate/mp3player.js
Created June 12, 2013 14:22
Show Gist options
  • Save alessioalex/5765711 to your computer and use it in GitHub Desktop.
Save alessioalex/5765711 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