Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (30 sloc) 943 Bytes


Author: Jan Wedekind Copyright: 2010 License: GPL


This Ruby extension provides an interface for playing audio data using ALSA.


To install the Hornetseye ALSA bindings, use the following command:

$ sudo gem install hornetseye-alsa

You can install from source as follows:

$ rake
$ sudo rake install


Simply run Interactive Ruby:

$ irb

You can load and use ALSA as shown below. This example will open microphone and speakers and then write the input of the microphone to the speakers.

require 'rubygems'
require 'hornetseye_alsa'
include Hornetseye
microphone = 'default:0' # or 'default:1' for USB microphone
speaker = 'default:0', microphone.rate, microphone.channels
while true
  frame = 1024
  speaker.write frame
Something went wrong with that request. Please try again.