in reply to Text to Speech Win32::OLE Error
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.
haha, and ++ for "Would you like to play a game", the "Hello, World" of text to speech :-)#!/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($_); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Text to Speech Win32::OLE Solution
by TROGDOR (Scribe) on Nov 02, 2004 at 00:43 UTC | |
by jimrobertsiii (Scribe) on Nov 02, 2004 at 05:34 UTC | |
Re^2: Text to Speech Win32::OLE Solution
by Jouke (Curate) on Nov 02, 2004 at 10:54 UTC |
In Section
Seekers of Perl Wisdom