Category Archives: icanhasaudio

Identifying unknown music with Ruby

Ben Bleything inspired me (or rather distracted me from my yak shaving) to get my music library cleaned up and remove duplicates. Unfortunately my duplicates don't necessarily have ID3 tags, and they may be in different formats, so I wrote a gem called "earworm" which will identify unknown music. First I'll give you [...]

king of teh intarwebs

I made a new website for icanhasaudio. You can has website view here.
Feel free to get your encoding/decoding on.

Decode MP3s with Ruby

Here is an example of decoding mp3s using ruby. First make sure to install icanhasaudio. It should just be a "gem install icanhasaudio". Here is the code:

require 'rubygems'
require 'icanhasaudio'
reader = Audio::MPEG::Decoder.new
reader.decode(File.open(ARGV[0], 'rb'), $stdout)

icanhasaudio just takes two IO streams, an input and an output. In our case the input is the file [...]