25 July 2007 @ 11:33Say it ain’t so!
You know the annoying “You’ve got mail!” that AOL says when, of course, you’ve (you, not me) got mail?
I was setting up Mail.app on a user’s new laptop one day, when she asked me if it would say “You’ve got mail!” when she gets new mail. Ugh. I told her no, but that I might be able to make it do that. So here is an Applescript that will save to file whatever text you enter, in whatever voice you choose.
Once you create the speech file, put it in ~/Library/Sounds , then in the Mail preferences set your “New mail” sound to this newly created file.
property theText : "" property theVoice : "" display dialog ¬ "What do you want to speak?" default answer theText set the theText to text returned of result display dialog ¬ "What voice do you want to use?" default answer theVoice set the theVoice to text returned of result say theText using theVoice saving to ¬ (choose file name with prompt ¬ "Save audio as:" default name "speech.aiff")