Firefox sometimes causes garbled audio, caused by speech dispatcher

Bug #1906741 reported by Dave Evans
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
Confirmed
Undecided
Unassigned
pulseaudio (Ubuntu)
Confirmed
Undecided
Unassigned
speech-dispatcher (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Opening certain applications/websites at the same time as Firefox causes the audio to become garbled.

The audio sounds distorted with an echo.

Certain actions are guaranteed to cause this, but it can also happening when only running instances of Firefox.

I've been able to consistently cause this by launching Zoom from a link within Firefox.
This does not occur when using Chrome.

The only way to fix the issue is to shut down all audio-related programs.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: firefox 83.0+build2-0ubuntu0.20.04.1
ProcVersionSignature: Ubuntu 5.4.0-56.62-generic 5.4.73
Uname: Linux 5.4.0-56-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
AddonCompatCheckDisabled: False
ApportVersion: 2.20.11-0ubuntu27.12
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: rdevans 55475 F.... pulseaudio
 /dev/snd/controlC0: rdevans 55475 F.... pulseaudio
 /dev/snd/controlC3: rdevans 55475 F.... pulseaudio
 /dev/snd/controlC1: rdevans 55475 F.... pulseaudio
BuildID: 20201112153044
CasperMD5CheckResult: skip
Channel: Unavailable
CurrentDesktop: ubuntu:GNOME
Date: Thu Dec 3 16:55:36 2020
Extensions: extensions.sqlite corrupt or missing
ForcedLayersAccel: False
IfupdownConfig:
 # interfaces(5) file used by ifup(8) and ifdown(8)
 auto lo
 iface lo inet loopback
IncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)
InstallationDate: Installed on 2017-10-20 (1140 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
IpRoute:
 default via 10.0.0.1 dev enp7s0 proto dhcp metric 100
 10.0.0.0/24 dev enp7s0 proto kernel scope link src 10.0.0.7 metric 100
 169.254.0.0/16 dev enp7s0 scope link metric 1000
Locales: extensions.sqlite corrupt or missing
PrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:354
PrefSources: prefs.js
Profiles: Profile0 (Default) - LastVersion=83.0/20201112153044 (In use)
RunningIncompatibleAddons: False
SourcePackage: firefox
Themes: extensions.sqlite corrupt or missing
UpgradeStatus: Upgraded to focal on 2020-11-12 (21 days ago)
dmi.bios.date: 02/18/2011
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: P1.40
dmi.board.name: H67M
dmi.board.vendor: ASRock
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrP1.40:bd02/18/2011:svnToBeFilledByO.E.M.:pnToBeFilledByO.E.M.:pvrToBeFilledByO.E.M.:rvnASRock:rnH67M:rvr:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.family: To Be Filled By O.E.M.
dmi.product.name: To Be Filled By O.E.M.
dmi.product.sku: To Be Filled By O.E.M.
dmi.product.version: To Be Filled By O.E.M.
dmi.sys.vendor: To Be Filled By O.E.M.

Revision history for this message
Dave Evans (rdevans) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

Can you elaborate on which audio streams are garbled? Is this for tracks being played back in firefox? In other applications? Or both?

Is this a recent regression, compared to how it worked before? If so, do you know precisely when it started happening?

Changed in firefox (Ubuntu):
status: New → Incomplete
Revision history for this message
Dave Evans (rdevans) wrote :

When the bug occurs, audio from all applications is garbled. I've tested firefox, zoom, and vlc, and all have garbled audio.

I have had this issue since at least May 2020. At the time I was using Ubuntu 18.04, and have since upgraded to 20.04

I've reinstalled pulseaudio which has not fixed the issue.

I think it might be related to speech applications interacting strangely with firefox. Opening zoom links works somewhat consistently, and the times when firefox spontaneously broke may have been due to discord running in the background.

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

I am tentatively adding a pulseaudio task.

Changed in firefox (Ubuntu):
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in firefox (Ubuntu):
status: New → Confirmed
Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
James Walters (iamjameswalters) wrote :

This is happening to me on Ubuntu MATE 20.04.1 with Firefox 84.0.

Like this user on Ask Ubuntu, I too have disabled media.webspeech.synth and uninstalled all speech-dispatcher apps, and still have this issue.

https://askubuntu.com/questions/1240696/how-do-i-fix-garbled-audio-on-certain-web-sites-firefox

After seeing he has no answers, came here to file a bug, found this.

Revision history for this message
Bruce Heerssen (bheerssen) wrote :

This happens to me also. Weirdly, only Twitter videos seem affected. It's possible it happens elsewhere, but I haven't seen it yet.

Ubuntu 20.10
Firefox 84

Revision history for this message
chris m (chrsmyrs) wrote :

For me many videos have garbled audio, today it's https://octopus.com/, some others, e.g. a cloud guru, tedx weren't working before, but are now. Perhaps it's not related to the video format.

Ubuntu 20.04 and FF 84.0.2

Revision history for this message
Dave Evans (rdevans) wrote :

I can add some information to this bug (or what seems to be a bunch of related audio bugs).

In my case it is related to my sound card, switching to and from the soundcard audio causes the bug to appear and disappear.

Line-Out - Built-in Audio : No bug
Digital Output (S/PDIF) - EMU20k2 [Sound Blaster X-Fi Titanium Series] : Occasionally garbled audio

I've added more info about my hardware devices and drivers:

lspci | grep Audio

    00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
    01:00.1 Audio device: NVIDIA Corporation GP102 HDMI Audio Controller (rev a1)
    03:00.0 Audio device: Creative Labs EMU20k2 [Sound Blaster X-Fi Titanium Series] (rev 04)

sudo lshw -C sound

  *-multimedia
       description: Audio device
       product: GP102 HDMI Audio Controller
       vendor: NVIDIA Corporation
       physical id: 0.1
       bus info: pci@0000:01:00.1
       version: a1
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: driver=snd_hda_intel latency=0
       resources: irq:17 memory:fb080000-fb083fff
  *-usb
       description: Audio device
       product: HD Webcam C615
       vendor: Logitech, Inc.
       physical id: 2
       bus info: usb@1:1.2
       version: 0.11
       serial: 27A1DFD0
       capabilities: usb-2.00 audio-control
       configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
  *-multimedia
       description: Audio device
       product: 6 Series/C200 Series Chipset Family High Definition Audio Controller
       vendor: Intel Corporation
       physical id: 1b
       bus info: pci@0000:00:1b.0
       version: 05
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: driver=snd_hda_intel latency=0
       resources: irq:34 memory:f9300000-f9303fff
  *-multimedia
       description: Audio device
       product: EMU20k2 [Sound Blaster X-Fi Titanium Series]
       vendor: Creative Labs
       physical id: 0
       bus info: pci@0000:03:00.0
       version: 04
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: driver=snd_ctxfi latency=0
       resources: irq:17 memory:f9200000-f920ffff memory:f9000000-f91fffff memory:f8000000-f8ffffff

Revision history for this message
Johann Aadreas Weber (johannandreasweber) wrote :

I have also observed a similar behavior
with Ubuntu 20.04

lspci | grep Audio

09:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
0b:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller

uname -a

Linux jrechenknecht7 5.4.0-73-generic #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

and Firefox 88.0.1 (AMD64 Platform).

For me this bug also causes other applications to be distorted, too.

 sudo lshw -C sound

sudo lshw -C sound
  *-usb:4
       Beschreibung: Audio-Gerät
       Produkt: HD Webcam C615
       Hersteller: Logitech, Inc.
       Physische ID: a
       Bus-Informationen: usb@1:a
       Version: 0.11
       Seriennummer: 4B9FE1D0
       Fähigkeiten: usb-2.00 audio-control
       Konfiguration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
  *-multimedia
       Beschreibung: Audio device
       Produkt: Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
       Hersteller: Advanced Micro Devices, Inc. [AMD/ATI]
       Physische ID: 0.1
       Bus-Informationen: pci@0000:09:00.1
       Version: 00
       Breite: 64 bits
       Takt: 33MHz
       Fähigkeiten: pm pciexpress msi bus_master cap_list
       Konfiguration: driver=snd_hda_intel latency=0
       Ressourcen: irq:100 memory:fce60000-fce63fff
  *-multimedia
       Beschreibung: Audio device
       Produkt: Starship/Matisse HD Audio Controller
       Hersteller: Advanced Micro Devices, Inc. [AMD]
       Physische ID: 0.4
       Bus-Informationen: pci@0000:0b:00.4
       Version: 00
       Breite: 32 bits
       Takt: 33MHz
       Fähigkeiten: pm pciexpress msi bus_master cap_list
       Konfiguration: driver=snd_hda_intel latency=0
       Ressourcen: irq:102 memory:fc900000-fc907fff

Note that the behavior occurred when the Logitex C615 has been unplugged.
I was just curious, because Dave Evans has the same webcam so I could not exclude that
this may be related.

Revision history for this message
Donna Whisnant (dewhisna) wrote (last edit ):

I have the same issue on Xubuntu 20.04. I find that just exiting Firefox completely and relaunching it resolves the audio problem on other applications and stays fixed, even after relaunching Firefox, unless I go to a website that causes the issue to start again. So, it seems to be very website specific for triggering it. One website that always triggered it was, strangely enough, www.subway.com. I was in a live meeting with MS Teams (standalone application, not web-based) at the same time, but not 100% sure that MS Teams factored into it except that the audio of the meeting got scrambled up until I exited Firefox. If I went back to that website again, it would happen again.

Unlike the other commenters, I don't even have a webcam on this PC at the moment, so I don't think it's webcam related. But, I do have some other hardware in common with the previous poster -- specifically Radeon and Starship/Matisse Audio. At the time of the incident, the audio (of both MS Teams and Firefox) was playing on the Starship/Matisse Audio port. But based on all of the comments here, it doesn't seem to be sound/video card specific, as I'm seeing both Nvidia vs Radeon and Intel vs AMD throughout this thread.

$ lspci | grep Audio
2d:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X]
2f:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller

$ uname -a
Linux sylvester 5.4.0-73-generic #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ dpkg -l | grep firefox
ii firefox 88.0.1+build1-0ubuntu0.20.04.2 amd64 Safe and easy web browser from Mozilla
ii firefox-locale-en 88.0.1+build1-0ubuntu0.20.04.2 amd64 English language pack for Firefox

$ sudo lshw -C sound
  *-multimedia
       description: Audio device
       product: Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0.1
       bus info: pci@0000:2d:00.1
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi bus_master cap_list
       configuration: driver=snd_hda_intel latency=0
       resources: irq:116 memory:fce60000-fce63fff
  *-usb:2
       description: Audio device
       product: Plantronics .Audio 478 USB
       vendor: Plantronics
       physical id: 3
       bus info: usb@5:2.1.3
       version: 2.43
       capabilities: usb-2.00 audio-control
       configuration: driver=usbhid maxpower=120mA speed=12Mbit/s
  *-multimedia
       description: Audio device
       product: Starship/Matisse HD Audio Controller
       vendor: Advanced Micro Devices, Inc. [AMD]
       physical id: 0.4
       bus info: pci@0000:2f:00.4
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msi bus_master cap_list
       configuration: driver=snd_hda_intel latency=0
       resources: irq:118 memory:fcd00000-fcd07fff

Revision history for this message
Errol Terblanche (errolt) wrote :

Running Ubuntu 20.04 and I have the same issue with Firefox.
Watching Netflix works fine, till I go to some sites that has a tendency to crash audio. Then all audio goes garbled. Even doing an audio test in settings gives a garbled echo result.

When audio is crashed like this the pulseaudio service uses high CPU even when no audio is being played.

Opening a terminal and running "pulseaudio -k" to restart pulseaudio seems to fix the issue without closing Firefox or all the media apps.

Revision history for this message
Peter Mertz (frottier) wrote :

I have seen this happening for months, though not very often. But it happened yesterday and today again.

Music playing in the background (via Audacious) is garbled. This usually happens when I open a website in a new tab. Sounds like a bitcrusher effect to me.

I can reverse the effect by closing tabs, but I do not see a clear cause-and-effect pattern. There are not too many tabs open (< 15), it began when I opened Red Hat's site, but I had to close three other tabs before it reverted to normal.

Also, the sites did not even play Audio, none of them.

I'm on Linux for more than 15 years. This is one of the strangest things I have seen so far.
;)

Revision history for this message
Dimitris Kalamaras (dimitris-kalamaras) wrote :

Same issue here. Garbled noises are being heard on top of my music (playing in the background via Rhythmbox) after starting Firefox and visiting some random website.

My desktop is an AMD Ryzen on a Gigabyte X570 mobo with an nVidia GeForce GTX 1060 3GB GPU. Like others noted, the noises seem stop for a while when I change the Output Device from "Line Out - Starship/Matisse" to "HDMI / DisplayPort X - GP106 High Definition Audio Controller". But after some minutes playback (or perhaps visiting some other page with firefox?), the garbled noises appear again... Also, like others, the noises disappear if I close Firefox...

uname -a
Linux ryzen 5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

sudo dmidecode -t 2
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.
# SMBIOS implementations newer than version 3.2.0 are not
# fully supported by this version of dmidecode.

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
 Manufacturer: Gigabyte Technology Co., Ltd.
 Product Name: X570 GAMING X
 Version: Default string
 Serial Number: Default string
 Asset Tag: Default string
 Features:
  Board is a hosting board
  Board is replaceable
 Location In Chassis: Default string
 Chassis Handle: 0x0003
 Type: Motherboard
 Contained Object Handles: 0

sudo lshw -C sound
[sudo] password for dimitris:
  *-multimedia
       description: Audio device
       product: GP106 High Definition Audio Controller
       vendor: NVIDIA Corporation
       physical id: 0.1
       bus info: pci@0000:08:00.1
       version: a1
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: driver=snd_hda_intel latency=0
       resources: irq:127 memory:fc080000-fc083fff
  *-usb:0
       description: Video
       product: Webcam C270
       vendor: Logitech, Inc.
       physical id: 3
       bus info: usb@5:3
       version: 0.12
       serial: 212F66E0
       capabilities: usb-2.00
       configuration: driver=snd-usb-audio maxpower=500mA speed=480Mbit/s
  *-multimedia
       description: Audio device
       product: Starship/Matisse HD Audio Controller
       vendor: Advanced Micro Devices, Inc. [AMD]
       physical id: 0.4
       bus info: pci@0000:0a:00.4
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msi bus_master cap_list
       configuration: driver=snd_hda_intel latency=0
       resources: irq:129 memory:fc900000-fc907fff

lspci | grep Audio
08:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)
0a:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller

dpkg -l | grep firefox
ii firefox 89.0.1+build1-0ubuntu0.20.04.1 amd64 Safe and easy web browser from Mozilla

Revision history for this message
Dimitris Kalamaras (dimitris-kalamaras) wrote :

Also, disabled media.webspeech.synth.enabled in Firefox, but that did not solve the problem.

Revision history for this message
Donna Whisnant (dewhisna) wrote :

This happened again to me today. I was in a MSTeams chat session (standalone app, not the web version) and opened a webpage in Firefox that garbled the sound of the meeting in progress. I noticed that when it happened that in the system audio mixer/volume control manager, there was suddenly a lot of entries for "speech-dispatcher" that previously weren't there. And this was also reflected in the list from the `ps` command:

188672 0.0 0.0 450364 8304 ? Sl 11:50 0:00 /usr/lib/speech-dispatcher-modules/sd_espeak-ng /etc/speech-dispatcher/modules/espeak-ng.conf
188678 0.0 0.0 360052 5660 ? Sl 11:50 0:00 /usr/lib/speech-dispatcher-modules/sd_dummy /etc/speech-dispatcher/modules/dummy.conf
188681 0.0 0.0 360084 5972 ? Sl 11:50 0:00 /usr/lib/speech-dispatcher-modules/sd_generic /etc/speech-dispatcher/modules/mary-generic.conf
188684 0.0 0.0 360096 5492 ? Sl 11:50 0:00 /usr/lib/speech-dispatcher-modules/sd_generic /etc/speech-dispatcher/modules/espeak-generic.conf
188687 0.0 0.0 159724 2236 ? Ssl 11:50 0:00 /usr/bin/speech-dispatcher --spawn --communication-method unix_socket --socket-path /run/user/1000/speech-dispatcher/speechd.sock

Without touching the webpage or Firefox, I used the command-line to kill the one that looked to be the main speech-dispatcher process, which was the 188687 process ID in this case (which also closed the other speech-dispatcher processes). And immediately, the audio cleared up and I was able to continue browsing the webpage while the MSTeams meeting continued.

This makes me wonder if the problem is actually Firefox or if it's speech-dispatcher -- or perhaps it's the data that Firefox is streaming to speech-dispatcher??

Like the others in this thread, I have experimented with the speech settings in Firefox to no avail. If there's a magic setting to disable it, I haven't found it.

Revision history for this message
Donna Whisnant (dewhisna) wrote :

Once I discovered the connection with speech-dispatcher on my system (as noted above), I did some related searches and found a reddit article (https://www.reddit.com/r/firefox/comments/7n5vn6/linux_firefox_and_speechdispatcher_are_making/) related to this that indicates if you disable both the webspeech option and the reader it solves it:

reader.parse-on-load.enabled false
media.webspeech.synth.enabled false

And this also seems to be a duplicate (or at least related) bug report to this one:
https://bugs.launchpad.net/ubuntu/+source/speech-dispatcher/+bug/1821439

And other variants of Linux are reporting Firefox speech-dispatcher issues as well:
https://bugzilla.redhat.com/show_bug.cgi?id=1936901

I had previously experimented with only the webspeech option, to no avail, but I have now disabled both the webspeech option and the reader on mine. So far, I haven't had any issues with garbled sound since, but only time will tell. I suppose it would still be an issue for those who need text-to-speech support on their system and can't disable these things.

Olivier Tilloy (osomon)
summary: - Firefox sometimes causes garbled audio
+ Firefox sometimes causes garbled audio, caused by speech dispatcher
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in speech-dispatcher (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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