3 ms·
For me, running window.speechSynthesis.getVoices() in the web console of both Firefox and Chromium results in an empty list. Any idea how to populate it? Using
by est31 7y ago
For me, running window.speechSynthesis.getVoices() in the web console of both Firefox and Chromium results in an empty list. Any idea how to populate it? Using ubuntu packages of Firefox/Chromium. Nor does this demo work in any of the two: http://mdn.github.io/web-speech-api/speak-easy-synthesis/ http://mdn.github.io/web-speech-api/speak-easy-synthesis/
- Etheryte 7y agoOn macOS, the returned list contains the built-in operating system voices (about 50) and some additional ones by Google (roughly 20). The spec [1] says the voices made available are entirely up to the browser. Doesn't really answer your question, but at least some additional insight. [1] https://w3c.github.io/speech-api/#dom-speechsynthesis-getvoices https://w3c.github.io/speech-api/#dom-speechsynthesis-getvoi...
- est31 7y agoThanks for confirming that I'm looking at the right list!
- jajag 7y agoIt can take a while for the full voice list to load after speech synthesis is initialized on the page - try calling getVoices() again after a small delay.
- codegladiator 7y agoThis worked. First time I got an empty array. Second time I see an array with 47 items.