No access to window.speechSynthesis?


#1

I’m building a tool on top of Atom that requires access to window.speechSynthesis. However, when I call window.speechSynthesis.getVoices(), it returns empty array. In Google Chrome 36, this returns list of 76 voices available on my Mac.

How can I enable access to speech synthesis in Atom?


Audio/video view
#2

A bit of Googling gave me this:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742758

Apparently it’s disabled in Chromium, and you’d have to explicitly enable it with "--enable-speech-dispatcher" on the commandline, though I’m not sure how to do it programmatically.


#3

Thank you. Even when I try to run

Atom.app/Contents/MacOS$ ./Atom --enable-speech-dispatcher

it still shows no voices :frowning:


#4

Yea, it’s not an Atom parameter, rather a Chromium one. I’d be surprised if Atom simply handed those down to the Chromium layer.

I’m guessing there’ll be an API call for this though, might take some more digging.


#5

Thank you. I have similar problem with playback of mp3/mp4 files (link to forum), which are not supported by Chromium, but are supported in Google Chrome.

Is there a way to ask/force Atom to use Google Chrome, that I already have installed on my system, instead of using bundled Chromium browser? Maybe some command-line option?


#6

I highly doubt it, to be honest. I’m not the expert, but it’s probably not that easy.
You might fair better searching for node modules, which either do what you want or at least give you an idea how to get there?


#7

What I really want are two features: audio/video playback, and speech synthesis using voices installed in my OS. For speech, I can just call ‘say’ command as a poor-man replacement. But lack of mp3/mp4 playback is a dealbreaker.


#8

Looks like using Chrome isn’t an option: https://github.com/atom/atom-shell/issues/588

I think we can close this case.


#9

Thanks for the update. Closing.


#10