This manual documents Say for Speech Dispatcher, version 0.4.
Copyright © 2001, 2002, 2003, 2006 Brailcom, o.p.s.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
spd-say is a very simple client for Speech Dispatcher that takes some text from the
command line and some simple parameters and passes them to Speech Dispatcher
for synthesis. The resulting synthesized speech is then played on your speakers.
It can also be used for stopping and cancelling speech on Speech Dispatcher.
Usage: spd-say [options] ["some text"]
-r or --rateSet the rate of the speech (between -100 and +100, default see below).
-p or --pitchSet the pitch of the speech (between -100 and +100, default see below).
-R or --pitch-rangeSet the pitch range of the speech (between -100 and +100, default see below).
-i or --volumeSet the volume (intensity) of the speech (between -100 and +100, default see below).
-o or --output-moduleSet the output module. Default see below.
-O or --list-output-modulesList the output modules that are available with the current server.
-I or --sound-iconPlay the sound icon.
-l or --languageSet the language. The parameter is an iso language code, like en or
cs, possibly with a region qualification, like en-US or en-GB.
Default see below.
-t or --voice-typeSet the preferred voice type (male1, male2, male3, female1, female2, female3, child_male, child_female).
-L or --list-synthesis-voicesList the ”synthesis voices” supported by an output module. If no -o option is supplied, -L displays the synthesis voices provided by the default output module. Otherwise, it displays the synthesis voices provided by the chosen module.
-y or --synthesis-voiceSet the synthesis voice. The synthesis voice is an attribute of the chosen synthesizer. Most users will probably not wish to set it, but this setting is provided for completeness.
-m or --punctuation-modeSet the punctuation mode (none, some, most, all). Default see below.
-s or --spellingSpell the message.
-x or --ssmlSet SSML mode on (default: off). The text contains SSML markup.
-e or --pipe-modeSet pipe mode on (default: off). Read text to be spoken on stdin, write it on stdout unchanged, and the corresponding speech through Speech Dispatcher.
-w or --waitWait till the end of speaking the message. In this mode, spd-say returns only after the message is fully spoken on the speakers or after it gets discarded.
-S or --stopStop the previous message in Speech Dispatcher (regardless of the client who sent it and it’s priority) before saying the specified message. If no message is specified, it just performs the stop function.
-C or --cancelSimilar to -S, but it stops (cancels) all the messages in all the queues in
Speech Dispatcher. Use this for total stop of speech.
-v or --versionPrint version and copyright info.
-h or --helpPrint a short help message.
Defaults for rate, pitch, and volume are determined by DefaultRate,
DefaultPitch, and DefaultVolume settings in the speechd.conf file.
Factory defaults are 0, 0, and 100 respectively.
The default language code is determined by the DefaultLanguage setting in
the speechd.conf file. Factory default is en-US (American English).
The default output module is determined by the LanguageDefaultModule
setting in the speechd.conf file. Factory default is flite.
The default punctuation mode is determined by the DefaultPunctuationMode
setting in the speechd.conf file. Factory default is none.
In pipe mode (option --pipe-mode or -e), spd-say reads text from stdin, writes to stdout,
and also sends the text to Speech Dispatcher. Example:
$ cat README | spd-say -e
If a line begins with the characters !-!, the line is sent to Speech Dispatcher as a SSIP command. Example:
$ spd-say --pipe-mode The quality of mercy is not strained. !-!SET SELF VOICE FEMALE1 It droppeth as the gentle rain from heaven Upon the place beneath: it is twice blest; !-!SET SELF RATE 50 It blesseth him that gives and him that takes. ^D
Note that each line of input is individually sent to Speech Dispatcher, therefore
in the example above, the word heaven is taken as the end of a sentence.
It should be possible to use other text filtering utilities, such as tr
or fmt to compensate. For example, the following command would clean
up most cases:
$ cat INSTALL | fmt -u -w 1500 | spd-say -e
If the text itself contains !-!, just make sure it is not at the start of the line to prevent it from being interpreted as a SSIP command. The following sed command will do the job:
$ cat myfile | sed -e 's/^!-!/ !-!/g' - | spd-say -e
The input is sent to Speech Dispatcher as fast as it will accept and queue it.
To wait for each line to be spoken, use the --wait or -w option. Example:
$ spd-say --pipe-mode -w This line is spoken and processing waits for speaking to finish before this line is sent to Speech Dispatcher. ^D
You can abort a long speech narative with the --cancel or -C option.
$ spd-say -C