Speech Synthesis getVoices not working on Raspberry Pi?

1,645 views
Skip to first unread message

jc

unread,
Sep 11, 2016, 2:09:01 AM9/11/16
to Chromium-discuss
Hi all,

When I call speechsynthesis.getVoices, it returns an empty list (vai Electron/Chromium). This is only happening on my Raspberry Pi 3. When I run the same code on my Mac, I get a long list of voices.

Here is a code snippet:

window.onload = initialize;
function initialize() {
   window.speechSynthesis.onvoiceschanged = function() {
      console.log(window.speechSynthesis.getVoices());
   }
}

Many thanks in advance!
Jesse

paa123456

unread,
Sep 11, 2016, 4:19:56 AM9/11/16
to Chromium-discuss
Which Chromium release do you use?
In my tests on raspberry pi I did download chrome (not chromium) v22 on raspbian 2015(wheezy); chrome is not available on raspbian 2016 (jesse); The latest desktop releases are chrome v52;
My understanding is v22 is pretty old - does not yet have support for speechsynthesis.

If there is newer release of chrome or chromium browser on arm linux (raspberry pi) - let me know.

paul.

jc

unread,
Sep 12, 2016, 2:51:39 PM9/12/16
to Chromium-discuss
Thank you for your response! I'm just able to check the release now. Here is the info:

Chrome 52.0.2743.82
Node 6.3.0
Electron 1.3.5

Jesse

paa123456

unread,
Sep 13, 2016, 3:29:02 AM9/13/16
to Chromium-discuss
You wrote you test on mac os and raspberry pi. Which distro do you use on rapberry pi? Is the info you wrote - Chrome 52.0.2743.82 for mac os x or also on rapberry pi? If not , what is the chrome release number for raspberry pi?

paul.

jc

unread,
Sep 13, 2016, 9:27:13 AM9/13/16
to Chromium-discuss
Sorry I wasn't clear. Those numbers are for the Raspberry Pi. I believe the numbers for Mac are identical. Thanks again!

paa123456

unread,
Sep 14, 2016, 5:00:27 PM9/14/16
to Chromium-discuss
This comes as a surprise for me - latest chrome browser on raspberry pi. Is this a native arm processor build?
I did read on people using an x86 emulator - running x86 linux version on raspberry pi.

I would like to get details on the install and to test with it.
What hardware do you have - pi, pi2, pi3 ?
Which distribution do you use, and which release date? The most popular seems to be raspbian, 2016(jesse).
How did you get the browser - through 'apt-get' or download/unzip?

I can recommend finding previous releases of chrome and testing  speechSynthesis api-s on raspberry pi..


paul.

jc

unread,
Sep 14, 2016, 5:47:03 PM9/14/16
to paa1...@yahoo.com, Chromium-discuss
Hi Paul,

Thanks again for your help. I didn't actually install the Chrome browser. I installed electron ('npm install electron' -- also tried 'npm install electron-prebuilt') and I believe Chromium was installed as part of this. Sorry if I didn't make that clear. I'm running on a pi 3 with the standard raspbian 2016 (jessie).

Let me know if I missed any details.

Kind regards,
Jesse

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

PhistucK

unread,
Sep 15, 2016, 2:46:53 AM9/15/16
to jvc...@gmail.com, paa1...@yahoo.com, Chromium-discuss
I believe Chromium needs API keys in order to use Google web APIs and the speech synthesis feature uses Google web APIs for text to speech.
See API Keys for details.


PhistucK

jc

unread,
Sep 15, 2016, 12:12:23 PM9/15/16
to PhistucK, paa1...@yahoo.com, Chromium-discuss
Thanks for the response. I am able to get SpeechSynthesis working on my Mac without an API key, using the same Electron setup as on the raspberry pi. So that makes me think an API key is not required. (Note that I am not able to get SpeechRecognition running on my Mac, which I believe does need an API key).

PhistucK

unread,
Sep 15, 2016, 3:15:29 PM9/15/16
to jc, paa1...@yahoo.com, Chromium-discuss
I do not know the details, but I imagine macOS has native text to speech APIs that Chromium uses and voices provided by the operating system are indeed available, but voices that come from the Google web API are not available.
I do not know whether Linux has native text to speech APIs, or whether Chromium uses them, but I imagine there are none, which explains why it works on macOS but not on Raspberry Pi.


PhistucK

jc

unread,
Sep 15, 2016, 3:59:32 PM9/15/16
to PhistucK, paa1...@yahoo.com, Chromium-discuss
You're right, they do seem to come from macOS! I took a look at 'Dictation and Speech' in Settings on my Mac. At first I only saw 6 voices, but then I clicked 'Customize' and I saw a whole bunch more voices that seemed to map to the ones that showed up from getVoices. So it seems that they do come from the operating system. Thank you for the answer! Now to see if I can find something comparable for the Raspberry Pi...

PhistucK

unread,
Sep 16, 2016, 4:42:57 PM9/16/16
to jc, paa1...@yahoo.com, Chromium-discuss
I just happened to notice that Chrome includes http://devel.freebsoft.org/speechd in chrome:credits, so that might be a clue.


PhistucK

jc

unread,
Sep 16, 2016, 9:17:32 PM9/16/16
to PhistucK, paa1...@yahoo.com, Chromium-discuss
Interesting. Thank you!

Brandon Corlett

unread,
Nov 13, 2016, 1:53:06 AM11/13/16
to Chromium-discuss
Any luck with this? I'm having the same problem.
Reply all
Reply to author
Forward
0 new messages