0.10.1 / August 9, 2020
|Documentation||Speech Dispatcher manual (freebsoft.org/doc)
Speech-dispatcher is a system daemon that allows programs to use one of the installed speech synthesizer programs to produce audio from text input as long as it has a special module or a configuration file for the speech synthesizer programs you want to use. It sits a a layer between programs that would like to turn text into speech and programs who actually do that.
Features And Usability
Speech dispatcher can't be used for much on its own. It is meant to be called from programs like KMouth when they need text to speech functionality. You will generally not have to interact with it on your own. You may, from time to time, notice that it has magically appeared in the process list. That's a result of some program asking it to provide text-to-speech functionality.
There is a separate package you can install called
speech-dispatcher-utils which contains a tool called
spd-say. That tool can be used to make your computer
spd-say whatever in a terminal. That program is useful if you want to record some computer-generated statement or test a new speech-dispatcher configuration. It is not generally very useful.
Speech-dispatcher can be configured using the configuration file
/etc/speech-dispatcher/speechd.conf and "module" specific configuration files in
Speech-dispatcher supports the following free software text to speech solutions out-of-the-box:
- flite (festival "light")
It does come with additional modules for non-free text to speech software.
The text to speech program it uses is selected by the
# DefaultModule espeak-ng DefaultModule flite # DefaultModule festival # DefaultModule mimic-generic
There is also a "generic" module available. This "generic" module can be used to create custom "modules" (=configuration files) for any text to speech software, like mimic, which is not supported by a speech-dispatcher C module.
Custom module configuration files need nothing more than a
GenericExecuteSynth variable with a executable and a command line and a
GenericCmdDependency option pointing to the binary.
All you need to make mimic work with speech-dispatcher is:
And a line in
/etc/speech-dispatcher/speechd.conf that says:
You may want to make your custom module slightly more advanced. Generic module configuration files support choosing voices the underlying speech synthesis program supports. Making a module support voices is a matter of adding voices with
AddVoice statements and passing a
$VOICE variable to the speech engine.
The default voice is set in
/etc/speech-dispatcher/speechd.conf using a
DefaultVoiceType statement. Having a
DefaultVoiceType statement in a module configuration file makes no difference.
spd-say -L when those
AddVoice statements are present makes it list the voices as available:
$spd-say -L NAME LANGUAGE VARIANT slt en-us FEMALE1 ab en-us MALE1 awb en-us MALE2 rms en-us MALE3
spd-say know about can be used by using the
-t argument and the variant name in lowcase:
spd-say -t male2 "Hello world"
awb on to mimic using the
You will want to use the
$LANGUAGE variable if you make a speech-dispatcher module for some back-end with language-specific voices.