speakText()
Converts provided text into spoken audio output.
int speakText(String text,
Locale locale)
Parameters
text
The string that will be read out loud.
locale
This defines the language and dialect to be used (e.g., en_US or zh_TW).
Return value
0 if function calling is successful; otherwise, -1 .
Exception
The following exceptions may be thrown: UnregisteredAppException, GlassesPermissionDeniedException.
See also
Responding from VIVE AI Glasses event
void onTextSpoken (SynthesisEvent event)
Tells the callback function when a TTSEvent is triggered.
Error handling and exceptions
This represents an error thrown by the VIVE AI Glasses SDK.