A HexChat addon for Linux to play notifications directly from Alsa
HexChat uses its internal engine to play sound notifications (or libcanberra), while this is usually ok for most users, some of us have more than one sound card, or a specific hardware/software setup that could create some issues, such as a complex .asound configuration or using multiple sound servers like jack with pulseaudio. With this script you can use a specific alsa hardware card or, eventually, a plug:device if set in the .asoundrc file.
- A Linux system with working ALSA sound
- Python scripting interface plugin for HexChat
alsa_notify.py and put it in the HexChat addon directory (usually it
~/.config/hexchat/addons/) or load it from HexChat through Window/Plugins
and Scripts window.
Once the plugin is loaded it selects the first available hardware device and
tries to use a default file (
There is a custom menu added in the
Settings menu of HexChat, you can control
basic behavior of the plugins from here. Apart from that, there's a full command
/alsanotify <command> [option]
||List available sound cards|
||Set card id|
||Test "file" wave (must be a stereo wave file)*|
||Set "file" wave*|
||Show a file open dialog to select a file;
add "test" argument to just listen to the file,
otherwise it will be set if successfully opened
||Download default sound file|
||List available events|
||Enable "event" notifications**|
||Disable "event" notifications**|
||Show informations about this script|
||Show this help|
file name can be an absolute or relative path ('
~' is accepted).
event is case insensitive.
The script automatically enables the 2 default events (more events might be added in the future) once installed, which are "Channel highlights" when an user types your nick.
If you just download the script without the default file, you can make the
script to download it for you using the
Right now I don't know how to really open any audio file yet, so it's better to use a standard stereo Wave file at 44.1/48khz.
$ sox input.wav -r 48000 -c 2 output.wav
$ ffmpeg -i input.wav -ar 48000 -ac 2 output.wav