|
Preload Text-to-Speech
Available for Studio & SitePal
|
|
You may pre-load the Text to Speech audio in order to achieve a faster effect when calling the sayText() command:
- Call the loadAudio() command: loadText('The text is ready',2,1,3)
- Use the Javascript event function vh_ttsLoaded(args) in the HEAD section to check if the audio track is loaded:
"function vh_ttsLoaded(args){"
In this example you will see a JavaScript alert displayed when the text is ready.
- When the text is loaded, play it using the sayText() command:
"sayText(args, 2,1,3);"
Note: In this example we check to see if the text was loaded and only then play it.
The Text to Speech audio will play even if the pre-load was not done yet.
|
|
Back to Previous Page
|