Ruby-audiofile is a binding to the audiofile library, which reads audio (wav, au, aiff, but not ogg or mp3) and can divine information such as length, sample rate, etc. WWW: http://ruby-audiofile.sourceforge.net/