dorianriepe/personal-assistant

Web Speech API: Text to Speech

Closed this issue · 2 comments

Web Speech API: Text to Speech
var synth = window.speechSynthesis;
function speak(text, pitch, rate){
  var utterance = new SpeechSynthesisUtterance(text);
  utterance.pitch = pitch;
  utterance.rate = rate;
  synth.speak(utterance);
}

Bei der Default Rate schläft man ja ein 😂