Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Poor-man's AppleScript vocalizer' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Poor-man's AppleScript vocalizer
Authored by: michelle_eris on Jun 13, '11 08:21:10AM

There is an error if you click Cancel in the Change your Voice dialog. Here's the fix for it:

else if button returned of theResult is "Change Voice" then
set voiceReturned to (choose from list systemVoices with prompt "Choose new voice.")
if voiceReturned is not false then
set currentVoice to item 1 of voiceReturned
end if
end if

There's another error if the current voice is not found. One example of this is "badnews". This will handle that problem:


if text returned of theResult is not "" then
try
say text returned of theResult using currentVoice volume 1
on error number theNumber
if theNumber is -244 then
display dialog "The voice named " & currentVoice & " wasn't found"
end if
end try
end if



[ Reply to This | # ]