The mac command say
can specify the voice used with the -v flag.
say -v Alex "compile completed, put your swords down."
The available voices can be seen in System Preferences/Speech/Text to Speech. How can I get this list programmatically?
Python Version, courtesy of Barry Wark:
from AppKit import NSSpeechSynthesizer
print NSSpeechSynthesizer.availableVoices()
It is worth going through several of the voices before deciding on one. There is a huge variation in quality.
For example, Tom sounds a bit impatient, but way more realistic than Alex. And some of the British voices are great.
Using say -v '?' gives you a list of the installed voices plus some sample sentences that give you an idea what to expect of the voice. You have to go through preferences to install most of the really good voices, but they come with a Compact voice file that lets you hear what each voice sounds like before you actually download them.