Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <div id="langList"></div>
</body>
</html>
 
var langList = document.getElementById('langList');
if ('speechSynthesis' in window) {
    // Start an html table for languages details
    var text = '<table border=1><tr><th>Default<th>Language<th>Local<th>Name<th>URI</tr>';
    // Get voices; add to table markup
    function loadVoices() {
        var voices = speechSynthesis.getVoices();
        voices.forEach(function(voice, i) {
          // Add all details to table
          text += '<tr><td>' + voice.default + '<td>'
              + voice.lang + '<td>' + voice.localService
              + '<td>' + voice.name + '<td>' + voice.voiceURI;
        });
    }
    loadVoices();
    langList.innerHTML = text;
    // Chrome loads voices asynchronously.
    window.speechSynthesis.onvoiceschanged = function(e) {
        loadVoices();
        langList.innerHTML = text;
    }
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers