distorted sound in Ubuntu

In some constellations I use Ubuntu with HDMI output. Sometimes I had some problems using sound output via HDMI. These were distorted sound with scratches and echoes. Sometimes it hides after some seconds or minutes and sometimes I had to reboot.

I used then pavucontrol (install via apt install pavucontrol) to check the settings. This application is very nice, because you can see which application is using the sound output and you can adjust the volume per application.

The application showed me multiple processes of speech-dispatcher using my sound card. After i muted these application instances, the distorted sound was gone.

But what is speech-dispatcher? Speech-dispatcher is a server for text to speech. Some applications like Firefox seems to use it. For me I don’t need text to speech, so I uninstalled the package.

apt purge speech-dispatcher

For those who need it, there is also a related issue in Ubuntu’s bug tracker with some alternative solutions or workarounds.