4

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.

Mark Harrison
  • 297,451
  • 125
  • 333
  • 465
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622

1 Answers1

4

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
  • 2,480
  • 2
  • 23
  • 39
  • 3
    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 May 20 '10 at 22:42
  • You could use rdoc.info to automatically generate the docs. – Pablo Fernandez May 24 '10 at 10:12
  • It would be nice to know which Java libs you've used, for reference. – Jose Alban Oct 16 '15 at 14:28