saySSML
Audio.saySSML(ssml)
Parameters
ssml | Text to say. |
Returns
NothingDescription
Speak the formatted SSML given using text-to-speech through the computer’s audio system. Execution of the script will continue while the audio is playing.
This support document explains SSML here: https://www.w3.org/standards/history/speech-synthesis/
Example
// This is an example using the say-as to specify an input format and speak the date
var str = "<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US">" +
"<say-as type="date:mdy"> 1/29/2009 </say-as>" +
"</speak>";
Audio.saySSML(str);
// This example includes a pause of 500ms between the two words hello and there
var str = "<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US">" +
"hello <break time="500ms"> there" +
"</break></speak>";
Audio.saySSML(str);