#!perl # "Voice Lister" v1.0 # by David Seay # with addition by Vicki Brown, shamelessly stolen from other samples # # Alphabetized list of Mac's voices. use Mac::Speech; $count = CountVoices(); for $i (1..$count) { $voice = GetIndVoice($count - $i + 1); $desc = ${GetVoiceDescription($voice)}; $nameLength = ord(substr($desc,16,1)); $name = substr($desc,17,$nameLength); $channel = NewSpeechChannel($voice) or die $^E; print "$name\n"; SpeakText $channel, "$name"; while (SpeechBusy()) {} DisposeSpeechChannel $channel if $channel; }