say (text returned of (display dialog ¬It will first ask you what you want synthesized and then where you would like to save the file to. Note that a generated five minute synthesized file will not need to take five minues to save. It will not play the spoken text, and instead just build the spoken text into the saved file instantly.
"Enter what you would like synthesized into a file." default answer ¬
"Welcome to Mac OS X.")) saving to (choose file name with prompt ¬
"Choose where you would like to to save the file." default name "say.aiff")
[Editor's note: I tested this script and it works as expected ... but if you've got iTunes set to add things to the library automatically, don't forget that it happily adds AIFF files as well as MP3s ... not that I'd ever do anything like that!]

