I love the say command in OS X for this purpose. For scripting purposes, it’s as simple as say "what you're doing" in a shell or AppleScript. You can customize the script to say something appropriate, and even pass variables to it to make it dynamic. I discovered the -v flag for say a couple of years ago, and it doubles its usefulness in this application.

You can use -v NAME to change the voice of the speech synthesizer to any of the available system voices. This lets me give a different voice to each context, and use a different timbre for different status reports.

You can see all the available voices using say -v ?. Then, in your shell command, just use say -v Zarvox "[text to speak]" to switch. There’s also a useful -r flag, which changes the rate of speech (by words-per-minute). I find that -r 250 provides more fluid speech than the default for short sentences.

Side note: I’ve mentioned it before, but say is pretty smart about things like roman numerals. A few quirks, but try say "Mac OS X" or say "Superbowl XXVII".

There are a bunch of new voices in the recent versions of OS X, mostly an assortment of localized voices geared toward languages other than English. Here’s the full list with localities, and asterisks to indicate recent additions.

While exploring the new voices, I made a quick shell script to test them all at once. You can run it alone for default settings, or pass it a test string and/or a rate setting, e.g. play_all_voices.sh "this is my test string" 250. And here’s the audio output, in case you don’t want to bother:

HTML5 audio not supported All OS X voices “How are you?”

By the way, Apple recently (10.10.3) broke the at command I’ve always used for this. I’ll post soon about a solution using Automator, osascript, iCloud, and Calendars.↩