Speech Dispatcher under alsa

Hynek Hanke hanke at brailcom.org
Wed Mar 15 19:58:41 EST 2006


Steve Holmes píše v St 15. 03. 2006 v 16:29 -0700:
> Is there any possibility that a future version of speech-dispatcher
> would include a run time parameter to choose synthesiser module?

This is possible in Speech Dispatcher. The command to do it is

SET {self|all|ID} OUTPUT_MODULE module-name

where module-name is the name of the synthesizer as defined
in speech-dispatcher.conf.

It is not documented, however, because we are still not sure if this
should be a part of SSIP or there should be another mechanism (e.g.
completely symbolic voices mapped to synthesizers in the configuration).
It is not guaranteed it will stay in SSIP in future versions in this
form. 

An inconvenience is Speakup doesn't have a command for switching
synthesizers, so speechd-up doesn't support this.

However, it is still possible to do it externally from another
connection to Dispatcher. Most parameter settings in Speech Dispatcher
have a parameter from the set {self|ID|all} which signifies what
connections the setting should be applied to.

In SSIP, you must first determine the ID of the connection you want
to change the module for.  This, you can do through HISTORY GET
CLIENT_LIST . See documentation for SSIP in info or in the source tree
in doc/ or on http://www.freebsoft.org/speechd/ .

It works like this:

hanke at chopin:~$ telnet localhost 6560
Trying 127.0.0.1...
Connected to chopin.
Escape character is '^]'.

history get client_list
240-1 "test:speakup:softsynth" 1
240-2 "hanke:spd-say:main" 0
240-3 "hanke:spd-say:main" 0
240-4 "hanke:spd-say:main" 0
240-5 "hanke:spd-say:main" 0
240-6 "hanke:spd-say:main" 0
240-7 "hanke:spd-say:main" 0
240-8 "hanke:spd-say:main" 0
240 OK CLIENTS LIST SENT

You are interested in connections where the identification string
includes "speakup" and where the third parameter (active) is 1. The
first parameter is then the IDs of the connection.

For these IDs, you should call
SET ID OUTPUT_MODULE "module"
where ID is the number you read from HISTORY GET CLIENT_LIST. If you
have more (n) of them (not likely for speechd-up :), you have to call
this command n times.

set 1 output_module flite
216 OK OUTPUT MODULE SET

A simpler, immediate way, to do it, is to just call
SET ALL OUTPUT_MODULE module-name and set it for all connections.
However, it will also affect other clients to Speech Dispatcher,
so I don't advise you to do it unless you know it is what you want.

If you want to do this from a shell script, you might use the spdsend
utility distributed with Speech Dispatcher (docs in
src/c/clients/spd-send/README) to take care of the socket communication
for you. Or you can use one of the programming language interfaces.

You can also modify other parameters which are not possible to set from
speechd-up this way.

With regards,
Hynek Hanke





More information about the Speakup mailing list