Last Update: Fri Jul 27 10:15:36 -0600 2007


A package for playing with sound on MS Windows.


This package requires Ruby 1.8.0 or later. Ruby 1.8.2 or later is recommended.

Installation instructions

rake test (optional)
rake install (non-gem) or rake install_gem (gem)


   require 'win32/sound'
   include Win32

   # Get the current volume of the waveform-audio output device.
   p Sound.volume.join(", ") # left channel, right channel

   # Play a system sound"SystemAsterisk",Sound::ALIAS)

   # Play a wav file"somefile.wav")


API ideas derived (or not) from Perl's Win32::Sound module and Python's winsound package.

Known Bugs

None that I'm aware of. Please report any bugs on the Win32 Utils home page at

Questions and Comments

Please post questions and/or comments on one of the forums on the project page at Click the 'Forums' tab.

Future Plans

Add ability to retrieve information about WAV files. Add MIDI support?

Developer‘s Notes

The MessageBeep() function, which the Python "winsound" module contains, is intentionally omitted here. I felt it was redundant, because you can achieve the same effect with something like"SystemAsterisk", Sound::ALIAS).




(C) 2004-2007, Daniel J. Berger, All Rights Reserved


This package is provided "as is" and without any exblockquotess or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose.


Daniel Berger
djberg96 at nospam at gmail dot com
imperator on IRC (

Park Heesob
phasis at nospam at nownuri dot net
phasis68 on IRC (