ICANHASAUDIO is an audio processing gem for Ruby. It lets you convert MP3 and Ogg files to WAV files. ICANHASAUDIO also lets you encode AIFF and WAV files as MP3 files. BOOGS? Q'S? Email teh author.
To install ICANHASAUDIO, you must have lame-libs, libogg, and libvorbis installed.
On OS X:
% sudo port install libogg libvorbis lame % sudo gem install icanhasaudio
On Linux:
% sudo yum install libogg-devel libvorbis-devel lame-devel % sudo gem install icanhasaudio
On Windows:
Sorry! No windows gem yet. :-(
Here is an example of an audio decoder:
reader = Audio::MPEG::Decoder.new File.open(ARGV[0], 'rb') { |input_lol| File.open(ARGV[1], 'wb') { |output_lol| reader.decode(input_lol, output_lol) } }