Background
There are a few answers floating around on how to disable speech dispatcher. I tried a few without success. Since I was in the process of writing a music player and constantly seeing speech-dispatcher
as a sound source during testing it was annoying.
Below is a bash
solution using the console and a python
solution using a GUI.
From the Console
Enter these commands in the console after the $
prompt. The #
hashtag comments are not entered.
$ uptime
17:37:18 up 18 min, 1 user, load average: 1.63, 1.67, 1.41
# Had rebooted three times: soft, warm and cold.
# The unwanted jobs didn't appear until 18 minutes after
# cold boot.
$ ps aux | grep speech
rick 8919 0.0 0.0 289032 5000 ? Sl 17:33 0:00 /usr/lib/speech-dispatcher-modules/sd_dummy /etc/speech-dispatcher/modules/dummy.conf
rick 8922 0.0 0.0 326656 7468 ? Sl 17:33 0:00 /usr/lib/speech-dispatcher-modules/sd_espeak /etc/speech-dispatcher/modules/espeak.conf
rick 8927 0.0 0.0 289044 5028 ? Sl 17:33 0:00 /usr/lib/speech-dispatcher-modules/sd_generic /etc/speech-dispatcher/modules/generic.conf
rick 8930 0.0 0.0 289032 5032 ? Sl 17:33 0:00 /usr/lib/speech-dispatcher-modules/sd_cicero /etc/speech-dispatcher/modules/cicero.conf
rick 8934 0.0 0.0 98768 2380 ? Ssl 17:33 0:00 /usr/bin/speech-dispatcher --spawn --communication-method unix_socket --socket-path /run/user/1000/speech-dispatcher/speechd.sock
rick 17823 0.0 0.0 15776 928 pts/22 S+ 17:37 0:00 grep --color=auto speech
# Above are four unwanted sound sinks and controller
$ pgrep -f speech-dispatcher/modules
8919
8922
8927
8930
# pgrep shows just the unwanted sound sinks' PID
$ pkill -f speech-dispatcher/modules
# pkill nukes the unwanted sound sinks by PID
$ ps aux | grep speech
rick 8934 0.0 0.0 98768 2380 ? Ssl 17:33 0:00 /usr/bin/speech-dispatcher --spawn --communication-method unix_socket --socket-path /run/user/1000/speech-dispatcher/speechd.sock
rick 26836 0.0 0.0 15776 996 pts/22 S+ 17:41 0:00 grep --color=auto speech
# Running ps again shows success
You can put two commands above into a bash
script:
pgrep -f speech-dispatcher/modules
pkill -f speech-dispatcher/modules
The two line bash script that will delete the sound sinks for you.
Over-killing the PID Killing
The current project is a music player in Python so why not have it check when the speech-dispatcher
gremlins show up? Then it displays a message:

Here's the python code to serve as a guide:
def check_speech_dispatcher(self):
""" Four annoying speech dispatchers appear in Ubuntu """
if not DELETE_SPEECH:
return # Already done or don't want to kill pids
found_pids = list()
for Sink in pav.sinks_now:
if Sink.name == "speech-dispatcher":
found_pids.append(Sink.pid)
if len(found_pids) == 0:
return
global DELETE_SPEECH
DELETE_SPEECH = False # Don't show message again this session
title = "Speech Dispatcher Jobs Discovered."
text = str(len(found_pids)) + " instance(s) of Speech"
text += "Dispatcher have been found.\n\n"
text += "Do you want to cancel the job(s)?\n" # centered: \t breaks
answer = message.AskQuestion(self.play_top, title, text, 'no',
thread=self.get_refresh_thread())
text += "\n\t\tAnswer was: " + answer.result
self.info.cast(title + "\n\n" + text)
if answer.result != 'yes':
return # Don't delete pids
for pid in found_pids:
ext.kill_pid_running(pid)
Near the bottom is info.cast()
function. It zooms down a broadcast message. It's kind of like print()
command for a GUI application:

speech-dispatcher
will prevent your audio devices from being recognized. I would suggest you try this first. If that doesn't solve it, please add more details to your question about the problem with your audio. – Raffa Mar 29 '21 at 21:02