发声器在Mac上播放声音安装将此行添加到应用程序的Gemfile中: gem 'sounder'然后执行: $ bundle或者自己安装: $ gem install sounder用法Sounder::System.set_volume 70 # 0-100 Sounder.play File.expand_path('../support/mysound.m4a', __FILE__) sound = Sounder::Sound.new "/path/to/audio/file" sound.play my_group = Sounder::SoundGroup.new( :sound_one => File.expand_path('../lib/support/sound1.m4a', __FILE__), "sound_two