Pulseaudio bug in Ubuntu 20.04 [closed]

I have ubuntu 20.04, almost always when I'm listening to audio in another application like spotify (happens with others) and I open a page in firefox that plays audio (always caused by firefox), the audio starts to listen distorted completely, I have to stop all the audio, close the applications and run "$ pulseaudio -k" to fix it. Any idea how to fix it please?

PC Specifications: Motherboard: ASUS PRIME B550M-A (I use integrated audio) Processor: AMD Ryzen 7 3700x Memory: Kingston HyperX 24GB (8x2, 4x2) Video card: AMD Radeon RX550


Having a very similar issue, I track to a problem in the configuration of the speech-dispatcher and espeak-ng.

I found a solution in several step (but I am not sure that all of them are useful):

  • install espeak-ng: sudo apt-get install espeak-ng
  • open the configuration file of speech-dispatcher: sudo nano /etc/speech-dispatcher/speechd.conf (using any other text editor)
  • uncomment (remove the #) of the lines: AudioOutputMethod "pulse" AudioPulseMinLength 1764 AddModule "espeak-ng" "sd_espeak-ng" "espeak-ng.conf"

This should be enough. Notice that it took me some time to solve the issue and I am not sure that all step is useful, I strongly suspect that uncommenting line AudioPulseMinLength 1764 is enough.

It is important to note that I did remove the folder ~.config/speech-dispatcher to be sure to use the default system configuration but not necessarily useful in all cases.