Protected
constructorThe name of the Asset in Lens Studio.
Readonly
uniqueReturns the name of this object's type.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other
. Useful for checking if two references point to the same thing.
Generates speech AudioTrackAsset of a given text.
Input
should be the text to synthesize (Currently supports text in English only. Non English characters will be stripped).
Options
should be a TextToSpeech.Options.
onTTsComplete
should be a callback function which will be called once the audio generation is completed.
The callback will receive two parameters: the generated audio file (AudioTrackAsset) and maps of word/timing (TextToSpeech.WordInfo).
onTTSError
should be a callback function which will be called if there is an error. This callback will receive a message of the error code and its description.
Allows generation of audio from a given text with a variety of options.
Remarks
You can use only one
TextToSpeechModule
in a Lens. However, its methods can be called multiple times in parallel if needed.See
Example