Translations of this page: English, Portuguese Brazil

Introduction

This document provides information about direct integration of Orca with Speech Dispatcher. SD backend is included in Orca from version 2.19.0, but version 2.19.90 or later is highly recommended.

This backend bypasses the Gnome Speech layer. There is also another solution, which runs as a Gnome Speech driver. The primary motivation for the direct approach is to allow a more straightforward mapping of the Orca speech API to the logic of Speech Dispatcher's API. Advanced features not supported by Gnome Speech may be used that way. Additional advantages might be lower latency and better stability.

Possible reasons for using Orca with Speech Dispatcher:

  • SD provides drivers for speech synthesizers not supported by Gnome Speech (and vice versa).
  • SD may use ALSA, OSS, NAS or PulseAudio for sound output, while with Gnome Speech you mostly get just OSS, which (among other limitations) does not allow audio device sharing on single channel sound cards.

  • SD is less resource intensive than Gnome Speech.
  • Gnome Speech suffers the problem of "stuttering" on some hardware configurations.
  • SD is more responsive. With certain speech synthesizers such as Festival the difference may be very significant because of audio sample caching.
  • SD can use sound icons to reduce the chattyness of the user interface.
  • SD can be shared by multiple assistive technologies, such as Orca, LSR, Speakup, Yasr, Brltty or Emacs with speechd-el. This makes their concurrent use on one system possible without conflicts.

Important note: Please make sure you are not using Speech Dispatcher as the Gnome Speech driver before reporting any problems, since the driver doesn't support many features described here. Read the section "Quick Start" carefully to check the difference in configuration.

News

  • 2008-06-09: See ../UbuntuHardy for instructions how to get Speech Dispacher running with Orca on Ubuntu Hardy.

  • 2008-02-14: Speech Dispatcher 0.6.6 fixes SMP bugs. Upgrade strongly recommended.
  • 2008-01-30: Reading punctuation keys in keyboard echo fixed in Espeak 1.31. Get espeak at http://espeak.sourceforge.net.

  • 2008-01-30: Reading punctuation characters in keyboard review mode fixed in both Orca trunk and gnome-2-20 branch. See bug 512608 for more information.

  • 2007-11-30: Speech Dispatcher 0.6.5 adds support for PulseAudio output.

  • 2007-08-28: Speech Dispatcher 0.6.4 together with Orca 2.19.90 adds support for choosing the prefered synthesizer and voice from within Orca preferences dialog.
  • 2007-05-24: Voice Properties implemented in Orca trunk. See bug 440294.

Quick Start

Speech Dispatcher 0.6.6 or later is recommended, but you will get some basic support even with 0.6.2. If you installed Speech Dispatcher as a package, you may (depending on your distribution) also need to install the Speech Dispatcher Python Interface. In Debian and Ubuntu, the package is called 'python-speechd'.

The easiest way of configuring Speech Dispatcher is running the 'spd-conf' utility from terminal. This utility is installed with the 'python-speechd' package since version 0.6.7. See the next section for more details about different configuration options.

Before proceeding it is always a good idea to test whether Speech Dispatcher works as expected by invoking the command "spd-say something".

If you have Speech Dispatcher working, the backend will automatically appear in the Orca preferences dialog. It must be listed in the "Speech system" combo box. The "Speech Dispatcher" item in the "Speech synthesizer" combo box belongs to the Speech Dispatcher Gnome Speech driver, so please make sure you select it as the "Speech system". If it doesn't appear there, see the Troubleshooting section below.

Speech Dispatcher Configuration

There are basically two ways of running SD - as a system-wide or per-user service. The later is necessary if you use Pulse Audio for sound output on your desktop (this is default in Ubuntu since Hardy). Both setups are supported by the 'spd-conf' utility mentioned before.

When run as a system-wide service, Speech Dispatcher will be started automatically during system boot (from /etc/init.d or so, depending on your distribution). When run per user, you need to add it to your GNOME session through System/Preferences/Session/Add.

Since Pulse Audio introduces some additional latency, it is still recommended to use Speech Dispatcher with ALSA. If your distribution uses Pulse Audio by default, you can reconfigure your desktop to ALSA output through System/Preferences/Sounds and disable starting the Pulse Audio service in System/Preferences/Session or uninstalling it altogether. Make sure this setup works before trying to configure Speech Dispatcher. It is not recommended to experiment with sound setup if you don't have alternative access to your computer (braille display, speakup, sighted help ...).

Orca Specific Configuration

You may use the Speech Dispatcher's per-client configuration to change its default setup just for Orca. The client name is 'orca', so your /etc/speech-dispatcher/clients/orca.conf may look like:

# Local configuration for Orca
BeginClient "*:orca:*"
    DefaultLanguage "es"
    DefaultCapLetRecognition "none"
EndClient

Don't forget to include orca.conf in your /etc/speech-dispatcher/speechd.conf. Learn more about client specific configuration in Speech Dispatcher Documentation.

Troubleshooting

Speech Dispatcher doesn't appear in the list of available speech systems

You probably don't have the right version of Speech Dispatcher or its Python client library.

1. Invoke the following command in terminal to check your installed SD version:

  $ speech-dispatcher --version

If it's not 0.6.2 or later, go and get it.

2. Check whether Speech Dispatcher works:

  $ spd-say "Hello, how are you?"

If it doesn't speak, check your configuration, see the logs (usually in /var/log/speech-dispatcher), read Speech Dispatcher's documentation or contact the mailing list to find out where the problem is.

3. Check the Python Speech Dispatcher interface:

  $ python -c "import speechd"

If that fails, the Python interface to Speech Dispatcher is not installed or not in your Python path. If you are on Debian or Ubuntu, check that you have the package 'python-speechd' installed. If you installed SD from source, check that the python libraries are installed in one of the directories returned by the following command:

  $ python -c "import sys; print sys.path"

Contact the mailing list if you are not able to solve this yourself.

The "Say all" function doesn't work

Make sure you are not using Speech Dispatcher as the Gnome Speech driver. The driver doesn't support this functionality. Please re-read the section Setup to make sure you are using the SD backend described in this document.

Orca hangs with 100% CPU usage when attempting to run setup

This sometimes happens with the Gnome Speech Festival driver. You need to kill the process named 'festival-synthesis-driver' and sometimes also Orca itself.

A possible workaround is to create a file ~/.orca/orca-customizations.py and copy the following code in it:

import orca.settings
# Omit "gnomespeechfactory" to prevent festival-synthesis-driver problem.
orca.settings.speechFactoryModules = ["espeechfactory","speechdispatcherfactory"]
orca.settings.speechServerFactory  = "speechdispatcherfactory"

Note, that this completely disables Gnome Speech from being used by Orca. Suggestions for a better solution are welcome.

Speech Dispatcher crashes frequently on a dual processor system

Install Speech Dispatcher 0.6.6 or later. It fixes important SMP bugs.

TODO

  • Use Orca controlled punctuation verbalization (see bug 440114).

Contact

Any feedback is welcome.

Projects/Orca/SpeechDispatcher (last edited 2013-12-28 19:28:07 by WilliamJonMcCann)