Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js speech synthesis

function speak( text ){

  let say = new SpeechSynthesisUtterance(text);
  say.pitch = 1;               // Set Pitch 
  say.rate = 1;                // Set Rate (speed)
  say.lang = "en-US";          // Set Language
  speechSynthesis.speak(say);  // Speak

}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #speech #synthesis
ADD COMMENT
Topic
Name
1+4 =