Speech Synthesis Not Working

Bug #1792300 reported by Lonnie Lee Best
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

In Ubuntu 16.04.5, Firefox supports Speech Synthesis by utilizing Text-To-Speech voices provided by default from the operating system.

In Windows 10, both both Firefox and Chrome support Speech Synthesis by utilizing Text-To-Speech voices provided by default from the operating system.

However,in Chromium 68 and 69, although the API is supported, Chromium cannot speak, because it doesn't seem to know how to load those Text-To-Speech voices that Firefox is successfully utilizing.

Here's what users said at Ask Ubuntu, regarding the issue:
https://askubuntu.com/questions/761975/

For example, this page should speak the text is shows:
http://www.lonniebest.com/CardTrick/

The link above does not work in Chromium 69 on Ubuntu, however it does work in the following browser/os combinations:

- Firefox (Ubuntu 16.04.5)
- Chrome (Windows 10)
- Firefox (Windows 10)

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: chromium-browser 69.0.3497.81-0ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 4.15.0-34.37~16.04.1-generic 4.15.18
Uname: Linux 4.15.0-34-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Sep 13 00:38:53 2018
Desktop-Session:
 'ubuntu'
 '/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg'
 '/usr/share/ubuntu:/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop'
DetectedPlugins:

Env:
 'None'
 'None'
InstallationDate: Installed on 2018-09-12 (0 days ago)
InstallationMedia: Ubuntu 16.04.5 LTS "Xenial Xerus" - Release amd64 (20180731)
Load-Avg-1min: 0.51
Load-Processes-Running-Percent: 0.1%
MachineType: System76 Bonobo WS
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-34-generic root=UUID=c57c4be3-fe0f-4162-804e-627e28920546 ro acpi_backlight=vendor quiet splash vt.handoff=7
SourcePackage: chromium-browser
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/12/2017
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1.05.04RSA5
dmi.board.asset.tag: Tag 12345
dmi.board.name: Bonobo WS
dmi.board.vendor: System76
dmi.board.version: bonw13
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: System76
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1.05.04RSA5:bd12/12/2017:svnSystem76:pnBonoboWS:pvrbonw13:rvnSystem76:rnBonoboWS:rvrbonw13:cvnSystem76:ct10:cvrN/A:
dmi.product.family: Not Applicable
dmi.product.name: Bonobo WS
dmi.product.version: bonw13
dmi.sys.vendor: System76
modified.conffile..etc.default.chromium-browser: [deleted]

Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in chromium-browser (Ubuntu):
status: New → Confirmed
Revision history for this message
Olivier Tilloy (osomon) wrote :

Sorry for the lack of timely feedback. Is this still an issue with the latest chromium version in Ubuntu 16.04 ? Does it work on 18.04 or newer Ubuntu releases, by any chance?

Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

I can confirm that this does not work in any version of Ubuntu.

For example, it does not work in 16.04, 19.04, and it even doesn't work via the snap package installation forced by Ubuntu 19.10:
https://discourse.ubuntu.com/t/call-for-testing-chromium-browser-deb-to-snap-transition/11179

If you need to test this, go to any of the articles listed here:
http://www.howtoadvice.com/

If you open an article in Firefox, the browser will read the article to you.

If you open an article in Chromium, it will not.

tags: added: snap
Revision history for this message
Olivier Tilloy (osomon) wrote :

I can confirm this doesn't work in chromium, neither snap (tested in 19.10) nor deb (tested in 18.04).

Note that with the deb, I'm seeing the following message:

    INFO:CONSOLE(765) "speechSynthesis.speak() without user activation is no longer allowed since M71, around December 2018. See https://www.chromestatus.com/feature/5687444770914304 for more details"

Lonnie, your CardTrick page will need to be updated to speak only upon user activation.

This isn't the root cause of the problem though, speech synthesis doesn't work in chromium even if user activated.

summary: - Chromium Speech Synthesis Not Working
+ Speech Synthesis Not Working
Changed in chromium-browser (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

You don't need to go to any web page in particular to test this.

Open the browser and hit ctrl-shift-I and then type this into the console and press enter:
speechSynthesis.speak(new SpeechSynthesisUtterance("Testing 1 2 3"));

This works in Ubuntu Firefox and in MS Windows Chrome, but it does not work in Ubuntu Chromium. This is true for the apt repository Chromium and for the snap repository Chromium in Ubuntu.

tags: added: focal
Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

User activation has been added to my trick for Chromium:
http://www.lonniebest.com/CardTrick/

As Olivier pointed out, the issue remains that speechSynthesis (a web standard that major browsers support in other operating systems) is not working Kubuntu 20.04 or Ubuntu 20.04. These are long term support releases. Where is the support? I reported this two years ago. What about the visual impaired people that depend on speechSynthesis?

To reproduce this bug, open Chromium on any web page and then hit ctrl-shift-I. At the console type (or copy/paste):
speechSynthesis.speak(new SpeechSynthesisUtterance("Testing 1 2 3"));

If you do not hear your browser speak "Testing 1 2 3", the bug is not fixed. Try the same test on Windows 10 to experience speechSynthesis working as expected.

Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

I was able to get Speech Synthesis working in Kubuntu via Firefox:
https://askubuntu.com/a/1262310/256054

However, I still can't get it working in Chromium.

Revision history for this message
guest271314 (guest271314) wrote :

Speech synthesis processing is not shipped in Chromium source code.

Ordinarily, in order to use speech synthesis at Chromium a speech synthesis engine needs to be installed, for example, espeak or espeak-ng, and speech-dispatch needs to be installed

  $ sudo apt install python3-speechd

then launch Chromium with

  --enable-speech-dispatcher

flag.

However, no voices are loaded at snap version of Chromium at

Chromium 85.0.4183.102 (Official Build) snap (64-bit)
Revision ffe848af6a5df4fa127e2929331116b7f9f1cb30-refs/branch-heads/4183@{#1770}
OS Linux

Chromium from https://download-chromium.appspot.com/

Chromium 87.0.4268.0 (Developer Build) custom (64-bit)
Revision b2793c4720e3daf929778440ff945eadf202b200-refs/heads/master@{#808630}
OS Linux
JavaScript V8 8.7.142

also has serious issues with Web Speech API implementation.

It should be possible to run

  $ spd-conf

then edit the speech synthesis engine configuration file to modify variations, which should be reflected in speechSynthesis.getVoices(), however, that also does not currently work for non-snap Chromium, where snap Chromium loads no voices at all.

Also, the queue to speech-dispatcher is severely broken at non-snap Chromium, requiring executing speechSynthesis.cancel() to cycle through the code that worked within the last few releases at https://guest271314.github.io/SSMLParser/, where the code outputs the expected result at Firefox 80 and Nightly 82.

Revision history for this message
guest271314 (guest271314) wrote :

Current broken state of speechSynthesis at Chromium https://bugs.chromium.org/p/chromium/issues/detail?id=1130231

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.