1\input texinfo @c -*-texinfo-*- 2@c %**start of header 3@setfilename spd-say.info 4@settitle Say client to Speech Dispatcher 5@finalout 6@c @setchapternewpage odd 7@c %**end of header 8 9@set VERSION 0.4 10 11@dircategory Sound 12 13@direntry 14* Say for Speech Dispatcher: (spd-say). Say. 15@end direntry 16 17@titlepage 18@title Say for Speech Dispatcher: (spd-say) 19@author Hynek Hanke <@email{hanke@@freebsoft.org}> 20 21@page 22@vskip 0pt plus 1filll 23 24This manual documents Say for Speech Dispatcher, version @value{VERSION}. 25 26Copyright @copyright{} 2001, 2002, 2003, 2006 Brailcom, o.p.s. 27 28@quotation 29Permission is granted to copy, distribute and/or modify this document 30under the terms of the GNU Free Documentation License, Version 1.2 31or any later version published by the Free Software Foundation; 32with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. 33A copy of the license is included in the section entitled "GNU 34Free Documentation License". 35@end quotation 36 37@end titlepage 38 39@ifnottex 40@node Top, , (dir), (dir) 41 42This manual documents Say for Speech Dispatcher, version @value{VERSION}. 43 44Copyright @copyright{} 2001, 2002, 2003, 2006 Brailcom, o.p.s. 45 46@quotation 47Permission is granted to copy, distribute and/or modify this document under the 48terms of the GNU Free Documentation License, Version 1.2 or any later version 49published by the Free Software Foundation; with no Invariant Sections, no 50Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included 51in the section entitled "GNU Free Documentation License". 52@end quotation 53@end ifnottex 54 55@ifhtml 56@heading Say for Speech Dispatcher 57@end ifhtml 58 59@chapter General 60 61@code{spd-say} is a very simple client for Speech Dispatcher that takes some text from the 62command line and some simple parameters and passes them to Speech Dispatcher 63for synthesis. The resulting synthesized speech is then played on your speakers. 64It can also be used for stopping and cancelling speech on Speech Dispatcher. 65 66Usage: @code{spd-say [options] ["some text"]} 67 68 69@table @code 70@item -r or --rate 71Set the rate of the speech (between -100 and +100, default see below). 72@item -p or --pitch 73Set the pitch of the speech (between -100 and +100, default see below). 74@item -R or --pitch-range 75Set the pitch range of the speech (between -100 and +100, default see below). 76@item -i or --volume 77Set the volume (intensity) of the speech (between -100 and +100, default see below). 78@item -o or --output-module 79Set the output module. Default see below. 80@item -O or --list-output-modules 81List the output modules that are available with the current server. 82@item -I or --sound-icon 83Play the sound icon. 84@item -l or --language 85Set the language. The parameter is an iso language code, like @code{en} or 86@code{cs}, possibly with a region qualification, like @code{en-US} or @code{en-GB}. 87Default see below. 88@item -t or --voice-type 89Set the preferred voice type (male1, male2, male3, female1, female2, 90female3, child_male, child_female). 91@item -L or --list-synthesis-voices 92List the ''synthesis voices'' supported by an output module. 93If no -o option is supplied, -L displays 94the synthesis voices provided by the default output module. Otherwise, 95it displays the synthesis voices provided by the chosen module. 96@item -y or --synthesis-voice 97Set the synthesis voice. The synthesis voice is an attribute of the 98chosen synthesizer. Most users will probably not wish to set it, but 99this setting is provided for completeness. 100@item -m or --punctuation-mode 101Set the punctuation mode (none, some, most, all). Default see below. 102@item -s or --spelling 103Spell the message. 104@item -x or --ssml 105Set SSML mode on (default: off). The text contains SSML markup. 106@item -e or --pipe-mode 107Set pipe mode on (default: off). Reads text from stdin, writes to stdout, and also 108sends to Speech Dispatcher. 109@item -w or --wait 110Wait till the end of speaking the message. In this mode, spd-say returns only after 111the message is fully spoken on the speakers or after it gets discarded. 112@item -S or --stop 113Stop the previous message in Speech Dispatcher (regardless of the client who sent 114it and it's priority) before saying the specified message. If no message is specified, 115it just performs the stop function. 116@item -C or --cancel 117Similar to @code{-S}, but it stops (cancels) all the messages in all the queues in 118Speech Dispatcher. Use this for total stop of speech. 119@item -v or --version 120Print version and copyright info. 121@item -h or --help 122Print a short help message. 123@end table 124 125Defaults for rate, pitch, and volume are determined by @code{DefaultRate}, 126@code{DefaultPitch}, and @code{DefaultVolume} settings in the @code{speechd.conf} file. 127Factory defaults are 0, 0, and 100 respectively. 128 129The default language code is determined by the @code{DefaultLanguage} setting in 130the @code{speechd.conf} file. Factory default is @code{en-US} (American English). 131 132The default output module is determined by the @code{LanguageDefaultModule} 133setting in the @code{speechd.conf} file. Factory default is @code{flite}. 134 135The default punctuation mode is determined by the @code{DefaultPunctuationMode} 136setting in the @code{speechd.conf} file. Factory default is @code{none}. 137 138@chapter Pipe Mode 139 140In pipe mode (option @code{--pipe-mode} or @code{-e}), spd-say reads text from stdin, writes to stdout, 141and also sends the text to Speech Dispatcher. Example: 142 143@example 144 $ cat README | spd-say -e 145@end example 146 147If a line begins with the characters 148@emph{!-!}, the line is sent to Speech Dispatcher as a SSIP command. Example: 149 150@example 151 $ spd-say --pipe-mode 152 The quality of mercy is not strained. 153 !-!SET SELF VOICE FEMALE1 154 It droppeth as the gentle rain from heaven 155 Upon the place beneath: it is twice blest; 156 !-!SET SELF RATE 50 157 It blesseth him that gives and him that takes. 158 ^D 159@end example 160 161Note that each line of input is individually sent to Speech Dispatcher, therefore 162in the example above, the word @emph{heaven} is taken as the end of a sentence. 163It should be possible to use other text filtering utilities, such as @code{tr} 164or @code{fmt} to compensate. For example, the following command would clean 165up most cases: 166 167@example 168 $ cat INSTALL | fmt -u -w 1500 | spd-say -e 169@end example 170 171If the text itself contains @emph{!-!}, just make sure it is not at the start 172of the line to prevent it from being interpreted as a SSIP command. The following 173sed command will do the job: 174 175@example 176 $ cat myfile | sed -e 's/^!-!/ !-!/g' - | spd-say -e 177@end example 178 179The input is sent to Speech Dispatcher as fast as it will accept and queue it. 180To wait for each line to be spoken, use the @code{--wait} or @code{-w} option. Example: 181 182@example 183 $ spd-say --pipe-mode -w 184 This line is spoken and processing waits for speaking to finish 185 before this line is sent to Speech Dispatcher. 186 ^D 187@end example 188 189You can abort a long speech narative with the @code{--cancel} or @code{-C} option. 190 191@example 192 $ spd-say -C 193@end example 194 195@bye 196 197@c speechd.texi ends here 198 199