title: Why is my Speech Synthesis API voice changing when function run more than 1 time?
body: <p>I have been using the new Speech Synthesis API in Chrome (33 and above) to make a web based communication aid. I would like the user to be able to change the voice between male and female, which the API allows me to do. However, when the page is first loaded and the first time the function is run (from an onclick event) it uses the default female voice. Then any time it is run after that, it uses the male voice that I am trying to use to. How can I make the male voice run the first time as well?</p>
  
  <p>Here is the button which calls the javascript:</p>
  
  <pre><code>&lt;button type="button" name="speakMe"id="speakMe" onclick="speakPhrase($('phraseBar').getValue());" &gt;&lt;img src="images/speakMe.png" /&gt;&lt;/button&gt;
  </code></pre>
  
  <p>And here is the speakPhrase function which is being called:</p>
  
  <pre><code>function speakPhrase(phrase) {
      if(phrase =="")
      {
          alert("Please enter a phrase before asking me to speak for you. Thank you!");
      }
      else
      {
          var speech = new SpeechSynthesisUtterance(phrase);
          var voices = window.speechSynthesis.getVoices();
          speech.voice = voices.filter(function(voice) { return voice.name == 'Google UK English Male'; })[0];
          window.speechSynthesis.speak(speech);
  
      }
  }
  </code></pre>
  
  <p>Can anyone help?</p>