// source http://jsbin.com/tukeda
function speak(textToSpeak) {
// Create a new instance of SpeechSynthesisUtterance
var newUtterance = new SpeechSynthesisUtterance();
console.dir(newUtterance);
// Set the text
newUtterance.text = textToSpeak;
// Add this text to the utterance queue
window.speechSynthesis.speak(newUtterance);
}
delay(1000,function(){
speak('You are Welcome');
});
delay(1500,function(){
speak('Please You can see my portfolio sections to see my work');
});
delay(6000,function(){
speak('Thanks');
});
delay(8000,function(){
speak('And remember, nakome@gmail.com');
});
function delay(time,callback){
var t = setTimeout(function(){
callback();
clearTimeout(t);
},time);
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
function speak(textToSpeak) {
// Create a new instance of SpeechSynthesisUtterance
var newUtterance = new SpeechSynthesisUtterance();
console.dir(newUtterance);
// Set the text
newUtterance.text = textToSpeak;
// Add this text to the utterance queue
window.speechSynthesis.speak(newUtterance);
}
delay(1000,function(){
speak('You are Welcome');
});
delay(1500,function(){
speak('Please You can see my portfolio sections to see my work');
});
delay(6000,function(){
speak('Thanks');
});
delay(8000,function(){
speak('And remember, nakome@gmail.com');
});
function delay(time,callback){
var t = setTimeout(function(){
callback();
clearTimeout(t);
},time);
}
</script>
<script id="jsbin-source-javascript" type="text/javascript">function speak(textToSpeak) {
// Create a new instance of SpeechSynthesisUtterance
var newUtterance = new SpeechSynthesisUtterance();
console.dir(newUtterance);
// Set the text
newUtterance.text = textToSpeak;
// Add this text to the utterance queue
window.speechSynthesis.speak(newUtterance);
}
delay(1000,function(){
speak('You are Welcome');
});
delay(1500,function(){
speak('Please You can see my portfolio sections to see my work');
});
delay(6000,function(){
speak('Thanks');
});
delay(8000,function(){
speak('And remember, nakome@gmail.com');
});
function delay(time,callback){
var t = setTimeout(function(){
callback();
clearTimeout(t);
},time);
}</script></body>
</html>