Right after I posted my thoughts on speech multiplexers, I had another idea. Would perl errors be easier to deal with if Marlene Deitrich spoke them to me? I cannot actually do that a the moment, but that stuff Kevin Lenzo works on can probably create the voice and all that. I can; however, use one of the Mac's voices.
I wrote a simple program to speak whatever I give it as input. I set the MAC_VOICE environment variable to one of the voices in the Speech panel of System Preferences. I name the program "speak".
#!/usr/bin/perl
use Mac::Speech;
my $Default_voice = 'Victoria';
my $voice = $Mac::Speech::Voice{ $ENV{MAC_VOICE} || 'Victoria' }; my $channel = NewSpeechChannel($voice); SpeakText( $channel, '' );
while( <> ) { SpeakText( $channel, $_ ); sleep 1 while SpeechBusy(); } DisposeSpeechChannel($channel);
#!/usr/bin/perl use strict;
$x = 1;
Global symbol "$x" requires explicit package name at bad.pl line 4. Execution of bad.pl aborted due to compilation errors.
g3_brian[1121]$ perl bad.pl 2>&1 | speak