xxxxxxxxxx
17
const speech = window.speechSynthesis;
const utterance = new SpeechSynthesisUtterance();
const sayings = [
'hello',
'i am a talking computer',
'are you a human?'
];
function setup() {
createCanvas(400, 400);
frameRate(0.5);
}
function draw() {
utterance.text = random(sayings);
speech.speak(utterance);
}