For me the html works only in Google Chrome.
I was very suprised but had much fun as I changed the 3 sound properties volume, rate and pitch.
Perhaps something for people who like sound on their dolls. It is possible to create this by yourself. You can change the phrases for example "Click" to "Kiss" or you add phrase blocks up to a 10min monologe. It's also possible, that you can talk and include code steps inside for different answers, but this code steps "to hear" your voice I've not included, because my experience is not enough, I always need to do a mouse click(a mouse event), when I want that my voice should be "heared". Have fun and proof it. Let me know if you like or not.
Note: I've not set the human-readable that describes the voice, my google chrome one is a women, perhaps yours a guy
To test the sound: Copy below code to a file and save it as an html file for example clickmesweety.html. Then open this file with a Google Chrome browser. To do a rerun click F5 on keyboard.
Code: Select all
<!DOCTYPE html>
<html>
<head>
<title>Clickmesweety</title>
<script>
function startfunction(){
console.log("starting");
var utterance = new SpeechSynthesisUtterance("Click me. ");
utterance.volume = 1;
utterance.rate = 0;
utterance.pitch = 0;
utterance.lang = 'en-US';
window.speechSynthesis.speak(utterance);
var utterance = new SpeechSynthesisUtterance("Sweety");
utterance.volume = 1;
utterance.rate = 0;
utterance.pitch = 2;
utterance.lang = 'en-US';
window.speechSynthesis.speak(utterance);
}
</script>
</head>
<body onload="startfunction();">
</body>
</html>