Every version of windows seems to do this different. Microsoft broke TTS when XP came out. Broken as far as I'm concerened because my code that worked on win2k doesn't on XP. I've given up on asking why. Try this speak.pl , it works on my XP machine. I pipe things into it via STDIN.
#!/usr/bin/perl
use strict;
use warnings;
use Win32::OLE;
my $v=Win32::OLE->new('SAPI.SpVoice');
while (<>) {
# space out numbers so they'll
# be spoken individually
my $single = s/(\d)/$1 /g;
$v->Speak($_);
}
haha, and ++ for "Would you like to play a game", the "Hello, World" of text to speech :-)