All pastes #394874 Raw Edit

tts

public text v1 · immutable
·published 2007-03-14 17:06 UTC
rendered paste body
use strict;
use vars qw($VERSION %IRSSI);

use Irssi;

$VERSION = '0.01';
%IRSSI = (
    authors     => 'zokier',
    contact     => 'zokier@IRCnet',
    name        => 'TTS-Reader',
    description => 'This script reads ' .
                   'all messages via Festival ' .
    license     => 'Public Domain',
);

sub sig_pub {
	my($server,$text,$nick,$hostmask,$channel)=@_;
	system("echo $text | festival --tts");
}

Irssi::signal_add_last('message public', 'sig_pub');