VOICE keyword
Turns text into natural-sounding speech (text-to-speech). SET VOICE must be used before using VOICE to setup audio features.
Syntax
VOICE "string", "wait"
Parameters
- string: text, max length of 300 chars. Adding in the text "--", "---" or "----" make a pause of 200ms, 400ms and 600ms. Only string with chars allowed, cannot use a string variable or expression. (required)
- wait: set "wait" to wait for voice to end when calling the WAIT command (default). Set "no-wait" will not wait.
Example
VOICE "Welcome to my app" ' Plays the voice
VOICE "Welcome to my app", "wait"
WAIT ' Voice must complete before continuing further
VOICE "Welcome to my app", "no-wait"
WAIT ' Code execution will continue even if voice is still playing
VOICE "This is a ---- long pause" ' Apply a pause
VOICE {"Welcome"|[FR]"Bienvenue"} ' Multilingual: language is selected according to the player's language
Go back to list of Keywords.