A Pen by guyfedwards

Tutorials of (A pen by guyfedwards) by Guyfedwards

<!DOCTYPE html>
<html >
<head>
  <meta charset="UTF-8">
  <title>A Pen by  guyfedwards</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>
  <button>Speak to me</button>
  
    <script  src="js/index.js"></script>

</body>
</html>
/* Downloaded from https://www.codeseek.co/ */
@import "lesshat";

/* Downloaded from https://www.codeseek.co/ */

function speak(){
  
 

  var msg = new SpeechSynthesisUtterance('Tally ho old chap, bloody good show');
  
  /*msg.voice = speechSynthesis.getVoices().filter(function(voice) { 
    return voie.name == 'Google UK English Male'; 
  })[0];*/
  
  var voices = window.speechSynthesis.getVoices();
  msg.default = false;
  msg.voice = voices[8]; 
  msg.voiceURI = 'native';

  speechSynthesis.speak(msg);
  
}


document.querySelector('button').addEventListener("click", speak, false);

This awesome code ( A Pen by guyfedwards ) is write by guyfedwards, you can se more from this user in the personal repository

You can find the original code on Codepen.io

2018 © guyfedwards