Such mechanisms usually require the use of one of the TTS engines ... and adequate voice/lang files, of course.