New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 768186 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

`speechSynthesis.getVoices()` returns empty list.

Reported by aur...@gmail.com, Sep 24 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36

Steps to reproduce the problem:
1. open web console
2. run `window.speechSynthesis.getVoices()`
3. see a empty list, no metter how many times you run the command.

What is the expected behavior?
- As on google-chrome, you can see a list of SpeechSynthesisVoice objects, on the second call.
- As on Firefox, you can see a list of SpeechSynthesisVoice objects, on the first call.

What went wrong?
Chromium is not providing a list of voices for speechSynthesis API.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 60.0.3112.78  Channel: stable
OS Version: Debian Testing
Flash Version: Shockwave Flash 26.0 r0

Can I provide a voice, like one from MBROLA project?
http://tcts.fpms.ac.be/synthesis/mbrola/mbrcopybin.html
 
test-getVoices.html
238 bytes View Download
Labels: Needs-Triage-M60

Comment 2 by phistuck@gmail.com, Sep 26 2017

Without modifying Chromium, I do not think you can add or customize voices.

Did you acquire and set API keys (see https://www.chromium.org/developers/how-tos/api-keys for instructions)? Without them, speech synthesis does not work.
The speech synthesis feature of Chrome/Chromium uses a remote Google API, as far as I know, so unless you are allowed to use that API (you have an API key and you have not exceeded the usage quota), this will not work.
Cc: sc00335...@techmahindra.com
Components: -Blink>Speech Internals>SpeechSynthesis
Labels: Triaged-ET M-63 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on reported version 60.0.3112.78, on stable version 61.0.3163.100 and on latest dev 63.0.3223.8 using Ubuntu 14.04,Windows 10 and Mac 10.12.6 using attached .html file. i.e; First list shows 0 and later shows list count. Attaching screenshot of same.

This issue is seen from M50 checked on 50.0.2652.0, so considering it as non-regression and marking it as Untriaged.
Issue 768186.png
176 KB View Download

Comment 4 by aur...@gmail.com, Sep 27 2017

Thanks by the information phistuck!

You mean a Chromium user must follow all this steps to use a TTS web app? :-(

Is this a temporary requirement? Could Chromium project use the same Firefox voices to not conflict with Google's service rules?

Comment 5 by phistuck@gmail.com, Sep 27 2017

Yes, a Chromium user must follow those steps (unless someone had already followed them for them and embedded the API keys in their customized binary, like Chrome does). Remember that Chromium is not meant to be used for general browsing and that the Chromium project does not release official Chromium binaries.
Whoever releases those binaries can choose to embed API keys (though it is somewhat illegal, as most of them are not even available for licensing and are only meant for Chrome/Google products. I guess speech synthesis is one of them).

I guess that if someone contributed a lightweight speech synthesis adapter implementation that makes Chromium use other voices, the project might accept it, but I am not a Googler, so I am just speculating here.

Comment 6 by phistuck@gmail.com, Sep 27 2017

And this is not a temporary requirement, as far as I understand.

Comment 7 Deleted

Have you tried attaching onvoiceschanged event handler to window.speechSynthesis, then checking if .getVoices() returns an array of voices?
.getVoices() returns results asynchronously, use onvoiceschanged event

window.speechSynthesis.onvoiceschanged = e => {
  const voices = window.speechSynthesis.getVoices();
  console.log(voices);
}
window.speechSynthesis.getVoices();
Components: Blink>Speech
Status: Available (was: Untriaged)

Sign in to add a comment