webSpeech API calls silently fail if speech-dispatcher is not installed
Categories
(Core :: Web Speech, defect)
Tracking
()
People
(Reporter: gcp, Assigned: gerard-majax)
References
Details
Attachments
(2 files, 1 obsolete file)
| Assignee | ||
Comment 1•4 years ago
|
||
André, we should fix this right? What would be the correct way? Could we display some banner to the user informing of the situation?
Comment 2•4 years ago
|
||
@eeejay is the right person here.
Comment 3•4 years ago
|
||
I think this is more of a documentation/spec issue than an actual bug. If there is no speech synthesis support on the platform an empty list of voices is expected, and "voiceschanged" will not get fired because no voices were added. If speak() is called in the case of no underlying engine it won't throw an exception, but the given utterance will receive an error event because there were no available voices. This is due to the asynchronous nature of the underlying implementation, and when this API was designed promises were new and weren't considered.
I can see how this can be frustrating for Linux users who don't have speech-dispatcher installed or configured correctly, but that is more due to the fragmentation of Linux desktop.
I can see how this poses a webcompat issue because other Linux browsers bundle their own voices and don't rely on the platform, so they will always have a list of voices.
So there are 3 possible solutions/mitigations I can see, and none of them are an easy fix or something we can unilaterally do:
- Package our own independent speech synthesis and don't rely on the platform's service.
- Robustify Linux speech synthesis offerings (a note about speech-dispatcher, flatpak/snap Firefoxs can't access it).
- Change the SpeechSynthesis spec to be promises based.
| Assignee | ||
Comment 4•4 years ago
|
||
(In reply to Eitan Isaacson [:eeejay] from comment #3)
[...]
So there are 3 possible solutions/mitigations I can see, and none of them are an easy fix or something we can unilaterally do:
- Package our own independent speech synthesis and don't rely on the platform's service.
DeepSpeech TTS is not a thing anymore, I dont know our official position toward Coqui, and that sounds like a heavy solution, I dont think it's really actionable
- Robustify Linux speech synthesis offerings (a note about speech-dispatcher, flatpak/snap Firefoxs can't access it).
I really don't see how showing a banner (in a way we can ensure the instructions are security-OK, we dont want to teach user bad habits) when we detect we have no voice installed or we lack libspeechd2.so would be problematic. True it is a dependency-level issue, but what about users installing without packages? There is barely any documentation at all, one has to poke everywhere.
Snap will get fixed, I've got a PR that was merged to expose the socket, and someone else is contributing socket activation support to speechd, so it should be fixed in the near future.
- Change the SpeechSynthesis spec to be promises based.
While it might be a good solution, it would ultimately be the website's job to notify the user to install stuff on his system ? I feel it already risky when done on our side, but giving the habit to follow that kind of instruction from random website would probably be a bad idea.
| Reporter | ||
Comment 5•4 years ago
|
||
Hi Eitan,
as Alexandre explained, we discontinued our investment in this area so option (1) seems contrary to those decisions. As for (3), this would be a thing further away in the future if we can even get buy in from other browser vendors and get all websites to rewrite all their code. And (2) is the reason we got here in the first place; the major Linux distros do NOT mark speech-dispatcher as a dependency (this is explained in the original comment). And we can say that it's their problem, but the solution the users adopt will be our problem: trying and using another browser.
So yes, the net result is that speech synthesis APIs work in other browsers but "Firefox is broken" and again, as the first comments already describe, it's quite difficult to diagnose this unless you find this bug or find the problem on StackOverflow or something.
I believe for things like DRM support we already support notification-like things to warn the user an EME module is missing, so it does not seem out of line to have a similar notification for missing packages? What do you think?
| Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 6•3 years ago
|
||
| Assignee | ||
Comment 7•3 years ago
|
||
Eitan, I believe there's a middle ground here actionable, see the attached WIP. While maybe it's too far reach to fix the spec and be promise-based to properly error the content, we can still catch the expected system-level errors (especially with speech-dispatcher, the fact we have been several loosing hours on that shows we can improve the situation) and expose a chrome-level notification that there's a misconfiguration and maybe direct the user to a support page. While those do not exists for the attached WIP, it's each to write.
Comment 8•3 years ago
|
||
Thanks for this patch. While I am not in love with the idea of a user-visible banner I understand the need for some action on this. If browser peers/UX sign off on this I am OK with it.
This issue reminds me a bit of CORS errors where web pages just seem to be broken and unresponsive. At least personally, I have been accustomed to looking for "Cross-Origin Request Blocked" messages in the console. Maybe instead of a banner some output in the console will give web devs and frustrated users an idea of what's going on? This could be an alternative to the banner in your patch.
I'll write some comments in the patch.
| Assignee | ||
Comment 9•3 years ago
|
||
Video showing the behavior.
| Assignee | ||
Comment 10•3 years ago
|
||
I could verify that this properly detects the failure on Snap package, open-fail being triggered.
| Assignee | ||
Comment 11•3 years ago
|
||
As per some suggestion from #ux on slack, adding possibility for the user to just dont be bothered (saved via a pref)
| Assignee | ||
Comment 12•3 years ago
|
||
Comment on attachment 9330377 [details]
Bug 1432719 - Notify user on speechd errors r?eeejay!
Asking for a UX review. There's one example of such notification, and the message will vary (as visible in the patch with the fluents strings) depending on the level of error. More details would be filled in some support pages.
Updated•3 years ago
|
Comment 13•3 years ago
|
||
(I'm in a work week so I don't have a lot of time right now. I am definitely not the right person to give this UI/UX-review, but I can try to find that person for you.)
Comment 14•3 years ago
|
||
Comment on attachment 9330377 [details]
Bug 1432719 - Notify user on speechd errors r?eeejay!
I passed this on on slack so going to clear this flag.
| Assignee | ||
Comment 15•3 years ago
|
||
So I've got UX verified and SUMO content is getting ready. I'll merge this after the current soft-freeze.
Comment 16•3 years ago
|
||
Comment 17•3 years ago
|
||
This is now backed out as per your request Alexandre.
Comment 18•3 years ago
|
||
Comment 19•3 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
Description
•