AIM::register("Festival TTS", "0.0.1", "goodbye", ""); AIM::print("Perl Says", "Loaded Festival TTS"); AIM::command("idle", "60000") if ($pro ne "Offline"); AIM::add_event_handler("event_im_recv", "synthesize"); sub goodbye { AIM::print("Module Unloaded", "Unloaded Festival TTS"); } sub synthesize { my $string = $_[0]; $string =~ s/\<.*?\>//g; $string =~ s/\".*\"//; system("echo \"$string\" | /usr/bin/festival --tts"); }