#/usr/bin/perl -w use strict; use Win32::OLE; my ($voice); &Init_Voice(); &Talk("STARTING"); print "\nType something!\n"; while (my $aa = ){ print "\nType something!\n"; chomp $aa; &Talk($aa); } sub Init_Voice{ $voice = Win32::OLE->new("Speech.VoiceText") or die("TTS failed"); $voice->Register("", "$0"); $voice->{Enabled} = 1; # optional $voice->{Speed}=150; return $voice; } sub Talk{ my $info = shift; return unless $info; $voice->Speak($info, 1); while ($voice->IsSpeaking()) { sleep 1; } return; } END{ sleep(3); }