speech — Text-to-Speech on iOS

The speech module provides simple text-to-speech functionality on iOS.

Functions in the speech module:

speech.say(text[, language, rate])

Speak the given text with one of the system’s text-to-speech voices. The language is given as a BCP-47 language and locale code, e.g. ‘en-US’. If no language is given, the system’s default is used.

The rate parameter specifies how fast the text is spoken. The value is between 0.0 (slowest) and 1.0 (fastest). The default is 0.5.

speech.stop()

Stop any speech synthesis.