[Xastir] audio alerts on os X
Jason KG4WSV
kg4wsv at gmail.com
Sat May 2 12:25:25 EDT 2009
On a whim I did a bit of playing with audio alerts on OS X.
I replaced the play command with /usr/bin/say (command line to OS X
speech synthesis) and replaced the file name with a string to be
spoken.
Almost got it, but /usr/local/share/xastir/sound/ was getting
prepended to the "filename".
Edited xastir config file, cleared out the SOUND_DIR entry. Bummer,
apparently the path is hard coded as a default, because it's still
there. Is there some sort of placeholder I can use to keep it empty?
Hacked out a little perl script to strip
/usr/local/share/xastir/sound/ from argv[0] and execute the say
command, and use it for the "play" command.
It works! I'm already sick of hearing my computer say "new station heard".
Maybe I'll see if I can fake a festival client the same way.
Perl script follows.
-Jason
kg4wsv
#!/usr/bin/perl
$ARGV[0] =~ s!/usr/local/share/xastir/sounds/!!g;
system("/usr/bin/say", (join " ", @ARGV));
More information about the Xastir
mailing list