TTS (text to speech)?

It would be nice to have a text to speech capability available in scripts. I haven’t been able to find the capability looking through the documentation, though I’m not sure if apple provides it in their javascript implementation.