Return value none
See also texttospeech.*
Generates and plays the speech. This process is not instant and it will take some time before you actually hear the sound.
String. The text to be spoken by a speech engine.
Table. Contains parameters for the call — see the next section for details.
params table includes parameters for the call.
String. Set the language to be used, values can be
'fr-FR' or other. Default is
'en-US'. See texttospeech.getLanguagesAndVoices() for the list of available languages.
String. Set the voice to be used. Default value is specific to the platform and the engine. See texttospeech.getLanguagesAndVoices() for the list of available voices.
Float. Set the pitch of the voice, value from
2.0. Default is
Float. Set the speech rate (speed), value from
2.0, default is
1.0. On iOS, tvOS and macOS limits are not known.
Float. Set the volume of the speech, value from
1.0. Default is
String. Speech identifier. If supplied, it will be passed to the corresponding listeners. Default value is a random numeric string.
filename optional ~(Android, macOS)~
String. If supplied, the generated speech will be written into a file instead of being played. WAV on Android, AIFF on macOS.
baseDir optional ~(Android, macOS)~
Constant. The base directory for the
filename. Default is
Listener. Listener which receives the onStart event, indicating that the speech has been started.
Listener. Listener which receives the onProgress event multiple times during the speech.
Listener. Listener which receives the onComplete event after the speech has ended.
onPause optional ~(not Android)~
Listener. Listener which receives the onPause event when the speech has been paused.
onContinue optional ~(not Android)~
Listener. Listener which receives the onContinue event when the speech has been resumed.