<script type="text/javascript" src="https://dev.thecubecast.com/content/kline/js/klineMAIN.js"></script>
kline.speakAloud(message, Wait);
method has two arguments, a string and a integer. Anything your program wants speak outloud would go
were the string is in quotes. The integer is the time the function will wait before speaking outloud in seconds.
if true {
kline.speakAloud("Our message", 1); //Calls speakAloud method
} // Says 'Our message' outloud after waiting 1s.
kline.speaktext(message);
method has only one argument, a string. Simliar to the speakAloud
method
whatever you put in as the string will be output. Only this time it outputs as text and to any html element with the id "Output"
.
<script>
if true {
kline.speakText("Our message"); //Calls speakText method
}
</script>
<!-- Outputs "Our message" to the element below -->
<output type="text" id="Output"></output>
Google Developers Documentation of Speech Synthesis-API.
Teamtreehouse blog written by Matt West on February 4, 2014