title: Run ResponsiveVoice speech on page load
body: <p>This works properly, it speaks the text area on click, but how can I change it to speak <code>onload</code>?</p>
  
  
  
  <pre><code>&lt;script src="http://responsivevoice.org/responsivevoice/responsivevoice.js"&gt;&lt;/script&gt;
  &lt;script src="http://code.jquery.com/jquery-git2.js"&gt;&lt;/script&gt;
  
  &lt;textarea id="text" cols="45" rows="3"&gt; HHHH&lt;/textarea&gt;
  
  &lt;select id="voiceselection"&gt;&lt;/select&gt;
  
  &lt;input onclick="responsiveVoice.speak($('#text').val(),$('#voiceselection').val());" type="button" value="Play" /&gt;
  &lt;br&gt;
  &lt;button id="isPlaying"&gt;Playing:&lt;/button&gt;
  &lt;p id="r"&gt;?&lt;/p&gt;
  </code></pre>
  
  <p>Text area just says four letters now. </p>
  
  <p>I imagine this is the key part, but can not fit it into anything properly to execute:</p>
  
  <pre class="lang-js prettyprint-override"><code>responsiveVoice.speak($('#text').val(),$('US English Female').val());
  </code></pre>
  
  <p>I tried:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var voicelist = responsiveVoice.getVoices();
  
  var vselect = $("#voiceselection");
  
  $.each(voicelist, function() {
    vselect.append($("&lt;option /&gt;").val(this.name).text(this.name));
  });
  
  // Yours
  $('#isPlaying').on('click', function() {
    $('#r').text(window.speechSynthesis.speaking)
  })
  
  $(document).ready(function() { //short code: $(function() { ... });
    responsiveVoice.speak($('#text').val(), $('US English Female').val());
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="http://responsivevoice.org/responsivevoice/responsivevoice.js"&gt;&lt;/script&gt;
  &lt;script src="http://code.jquery.com/jquery-git2.js"&gt;&lt;/script&gt;
  
  &lt;textarea id="text" cols="45" rows="3"&gt;It reads this&lt;/textarea&gt;
  
  &lt;select id="voiceselection"&gt;&lt;/select&gt;
  &lt;script&gt;
  &lt;/script&gt;
  
  &lt;input onclick="responsiveVoice.speak($('#text').val(),$('US English Female').val());" type="button" value="Play" /&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>But I get a "No voice found for: undefined" error.</p>