Speech dispatcher

提供: ArchWiki
2023年8月16日 (水) 22:20時点におけるKgx (トーク | 投稿記録)による版 (英語版から転載)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
ナビゲーションに移動 検索に移動

関連記事

Speech Dispatcher is a device independent layer for speech synthesis that provides a common easy to use interface for both client applications (programs that want to speak) and for software synthesizers (programs actually able to convert text to speech).

It is a part of the Free(b)soft project, which is intended to allow blind and visually impaired people to work with computer and Internet based on free software.

Installation

Install the speech-dispatcher package. If you wish you allow Festival to interact with it then you should also install festival-freebsoft-utilsAUR as well.

Configuration

The main configuration file is located at /etc/speech-dispatcher/speechd.conf however speech-dispatcher is usually run on a per user basis to allow for multiple users to have differing preferences. User configuration files are stored at ~/.config/speech-dispatcher/. There is also support to allow different speech synthesis engine clients to have their own configurations too.

Use the included spd-conf tool to change configuration options. By default it will run in interactive mode and ask you a series of questions in order to generate the type of file you require. It is recommended that you create a per user configuration unless you are absolutely sure you will be the only user. Altering the system configuration requires root permissions.

Basic configuration

To use interactive mode and answer questions about what you need run the following:

$ spd-conf

To create a per user configuration run the following:

$ spd-conf -uc

To edit the system wide configuration file run the following:

# spd-conf -C

Festival specific

この記事またはセクションの正確性には問題があります。
理由: From testing it appears as though this step is unnecessary, as long as Festival is running as a server speech-dispatcher seems to work without this edit. (議論: トーク:Speech dispatcher#)

If you intend to use Festival as your speech synthesis engine then you should also do the following:

$ $EDITOR ~/.config/speech-dispatcher/speechd.conf

Find and uncomment (by removing the # from in front of it) the line:

~/.config/speech-dispatcher/speechd.conf
...
#AddModule "festival"
...

Then save the file.

Usage

Using speech-dispatcher directly is not a common scenario as its intended to provide an access layer to other speech synthesis engines, that said you can interact with it directly by using the included spd-say binary as follows:

$ spd-say "Arch Linux is the best"

Troubleshooting

General

spd-conf contains a routine to test the operation of speech-dispatcher, you can run it with the following command:

$ spd-conf -d

Or use the following to get a very verbose log dump:

$ spd-conf -D

Other tests are available, for example testing Alsa, PulseAudio and Festival, to see a full list of available options run the following:

$ spd-conf --help

Most of the available tests will run as part of the test routine.

Using TTS causes the dummy output module to speak an error message

この記事またはセクションは加筆を必要としています。
理由: Its probably possible to automate this using a systemd service file (議論: トーク:Speech dispatcher#)

This happens when speech dispatcher cannot connect to the speech synthesis engine. If you are using Festival then it needs to be running as a server, this can be achieved with the following command:

$ festival --server &

See also