Running this in the browser console will cycle through all voices for language 'en*'.
(function() {
play();
async function play() {
let all = "Do no blue next turn. \n \
Do no blue next turn but add +2 if you score. \n Bye.";
sentences = all.split('\n');
voices = window.speechSynthesis.getVoices();
for (j=0; j < voices.length; j++) {
if (voices[j].lang.startsWith('en')) {
console.log(voices[j])
for (i = 0; i < sentences.length; i++) {
await getNextAudio(voices[j],sentences[i]);
}
}
}
async function getNextAudio(voice,sentence) {
console.log(sentence);
let audio = new SpeechSynthesisUtterance(sentence);
audio.voice = voice;
window.speechSynthesis.speak(audio);
return new Promise(resolve => {
audio.onend = resolve;
});
}
}
})();