views:

209

answers:

1

Any recommendation on libraries to do audio processing in Ruby. I need to do the following two tasks:

  • Find silences, for which I'm happy to just be able to iterate over each sample in the wave.
  • Cut and paste pieces of wav files to form a new wav file.
  • Convert wav to mp3, which I will probably leave to lame anyway.

I'm looking for the equivalent of NAudio, a C# library.

+1  A: 

One option is ruby-audio, which has a wrapper over libsndfile.

Personally, I haven't had much luck with audio manipulation in pure ruby, but I have used Java libraries from jruby to good effect.

Good luck!

Dan Fitch
Don't use fugal's ruby-audio. It's slow and buggy.The latest version is done by warhammerkid (myself) and can be found at http://github.com/warhammerkid/ruby-audio. I generated the rdocs and put them up on my server at http://doc.chromedshark.com/ruby-audio/ so glance through them and see if it works for you.
warhammerkid
You could use rdoc.info to automatically generate the docs.
J. Pablo Fernández