Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SpeechSynthesis.getVoices() not listing voices in Firefox

608 views
Skip to first unread message

Abhishek Potnis

unread,
Oct 9, 2017, 12:30:33 PM10/9/17
to dev-w...@lists.mozilla.org
I am developing an application that requires me to use text to speech in
the web browser. I am using the HTML5 Speech Synthesis for it. On Google
Chrome the code runs fine, with all the available voices being listed using
|getVoices()|, but in Firefox no voice is listed at all. I am testing my
code on Firefox 56.0 (Ubuntu).

On searching over the internet, I did come across a StackOverflow answer
<https://stackoverflow.com/questions/21513706/getting-the-list-of-voices-in-speechsynthesis-of-chrome-web-speech-api>
that
suggested that the getVoices() function should be called after the
|onVoiceChanged| event

window.speechSynthesis.onvoiceschanged = function() {
window.speechSynthesis.getVoices();
... };

I am invoking the call in the above mentioned manner and it works as
desired in Chrome, but not on Firefox.

Another StackOverflow answer suggested that I enable the
|media.webspeech.synth.enabled| in about:config of Firefox, but in my
Firefox the preference |media.webspeech.synth.enabled| is already set to
true.

I checked the MDN documentation
https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/getVoices and
the example on this page does not run for me in Firefox, but runs fine in
Chrome. I found that CanIUse.com
<http://caniuse.com/#feat=speech-synthesis> lists
that SpeechSynthesis as supported in Firefox 55 onwards, but it does not
work for me.

Also The demo <http://mdn.github.io/web-speech-api/speak-easy-synthesis/> by
Mozilla Developer Network to demonstrate the Speech Synthesis fails to work
on my Firefox, but runs fine on Google Chrome. I have extensively searched
online for a solution but could not find one. Can someone please point me
in the right direction here.

--
Regards,
Abhishek V. Potnis
Ph.D. Student,
Centre of Studies in Resources Engineering,
Indian Institute of Technology Bombay.
http://home.iitb.ac.in/~abhishekvpotnis

jrmath...@gmail.com

unread,
Jan 23, 2019, 1:01:34 PM1/23/19
to mozilla-d...@lists.mozilla.org
Hi, did you ever find a solution to this? I have the same issue, but under Windows 10. The speechSynthesis.getVoices() call returns an empty array.
0 new messages