| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
espeakf ¶Regarding installation: if you have not installed Emacspeak recently, and plan to install the package again soon for someone else, please practice a reinstall first. Perhaps, nowadays, all will go well; but perhaps not.
In the past, I have had troubles with Emacspeak installation, although in 2003 and more recently, everything has gone well. I am sighted, and do not depend on Emacspeak, so perhaps I continually renew my ignorance.
In addition to a computer with a sound system, Emacspeak requires three packages:
A hardware text-to-speech synthesizer is best, but I do not have one. Instead I use two different software text-to-speech synthesizers, both of which are immature programs that make use of the more basic Festival text-to-speech program.
Installation is extensively described in the Emacspeak manual. See Installation in The Emacspeak User’s Manual.
Also, James R. Van Zandt has written an installation HOWTO that is now maintained by Sharon Snider. It is in the Emacspeak sources and on the Web at http://www.tldp.org/HOWTO/Emacspeak-HOWTO/.
Please consider building and installing your software from source. This process is straightforward and I have done this in the past with great success.
However, I am going to describe only what you do to install
espeakf, which is not in Debian, and what you do in Debian to
install eflite. The process should be simple, but for some
reason, possibly because I tend to use unstable, experimental
software, I have not always found it so.
In Debian, as of April 2003, to install Emacspeak using the eflite software text-to-speech synthesizer, type the following in a shell:
apt-get install emacs21 emacs21-el emacspeak eflite
The emacs21-el package contains the Emacs Lisp source files that Emacs uses. In theory, you can run Emacs without them, but I have found them essential, if only for the extra documentation and commentary they provide. It does not matter if some of the packages are already installed or will be installed automatically.
After running apt-get, you should be able to run Emacspeak by
typing
emacspeak
in a shell. That command is a shell script in /usr/bin/emacspeak.
In theory, that is all there is to it. And if you are not using the awkward, non-standard system that I am, but instead are using a well configured, modern, standard system, what I just told you should work.
Since I run both the eflite and espeakf text-to-speech
synthesizers, and at this stage am running them in what amounts to a
local experiment, I copied the shell script that starts Emacspeak with
eflite from the /usr/bin/ directory to the /usr/local/bin/ directory
and renamed it to /usr/local/bin/emacspeak-eflite.
I start Emacspeak with espeakf with a different shell script,
called /usr/local/bin/emacspeak-espeakf. (These names are not
very imaginative, but I can remember them.)
espeakf is available from CVS on SourceForge. Fortunately, it
is easy to download and install.
First you need to decide on a directory in which you plan to keep the
espeakf directory that you will download. I use
/usr/local/src/
Make that directory if you do not have it already, then go to it.
Here are the commands, which I run as the non-privileged user ‘bob’ in a shell, such as one in Emacspeak that you can start with the Meta-x term command.
This facility is described in
(info "(emacspeak)Running Terminal Based Applications")
(Before you try Meta-x term, be sure to learn how to get out of
the buffer! In Term mode, the usual commands for killing a buffer or
switching buffers do not work. I find Control-c Control-f, the
new keybinding for find-file useful, as well as Control-c
k, which kills the buffer.)
In a shell, I first switch to the appropriate directory, and then I run the CVS login command:
cd /usr/local/src/ cvs -d :pserver:anonymous@cvs.espeakf.sourceforge.net:/cvsroot/espeakf login
You need to login once for CVS. The login command will ask for your password. Just press your return key. Then, type the following command:
cvs -d :pserver:anonymous@cvs.espeakf.sourceforge.net:/cvsroot/espeakf co espeakf
These commands will create a /usr/local/src/espeakf/ directory
below your /usr/local/src/ directory and fill it with several
files and other directories. To make use of the espeakf
text-to-speech synthesizer, Emacspeak runs an executable Perl script
called espeakf.pl. CVS installs that Perl script properly, so
you do not need to do anything.
However, you do need to modify your /usr/local/bin/emacspeak-eflite and /usr/local/bin/emacspeak-espeakf start up scripts for the two different text-to-speech synthesizers.
I use a variation on the /usr/bin/emacspeak script that
Emacspeak creates automatically. That script uses information from a
/etc/emacspeak.conf file. I ignore that configuration file
because the configuration for Emacspeak with the two synthesizers is
different. Instead, I put all the configuration information into the
two /usr/local/bin/ scripts.
The two scripts contain sharp signs, exclamation marks, left and right brackets, and much else. To listen to all the characters in them, you need to set Emacspeak’s punctuation mode to all. If you are listening to this in Emacspeak, you can evaluate the following expression by placing point after it and typing Control-x Control-e:
(dtk-set-punctuations 'all)
First, the /usr/local/bin/emacspeak-eflite script.
#!/bin/sh
## /usr/local/bin/emacspeak-eflite - execute emacs with speech enhancements
## use EFLITE
## based on
#$Id$
# with minor changes, 2006 Mar 18
if [ -f $HOME/.emacs ]
then
INITSTR="-l $HOME/.emacs"
fi
CL_ALL=""
for CL in $* ; do
if [ "$CL" = "-o" ]; then
DTK_PROGRAM=outloud
export DTK_PROGRAM
elif [ "$CL" = "-d" ]; then
DTK_PROGRAM=dtk-soft
export DTK_PROGRAM
elif [ "$CL" = "-q" ]; then
INITSTR=""
else
CL_ALL="$CL_ALL $CL"
fi
done
export EMACS_UNIBYTE=1
export DTK_PROGRAM=/usr/local/bin/eflite
export DTK_TCL=/usr/local/bin/eflite
exec emacs -q \
-l /usr/share/emacs/site-lisp/emacspeak/lisp/emacspeak-setup.el \
$INITSTR $CL_ALL
### end /usr/local/bin/emacspeak-eflite
Second, the /usr/local/bin/emacspeak-espeakf script:
#!/bin/sh
## /usr/local/bin/emacspeak-espeakf - execute emacs with speech enhancements
## use ESPEAKF
## based on
#$Id$
# with minor changes, 2006 Mar 18
if [ -f $HOME/.emacs ]
then
INITSTR="-l $HOME/.emacs"
fi
CL_ALL=""
for CL in $* ; do
if [ "$CL" = "-o" ]; then
DTK_PROGRAM=/usr/local/src/espeakf/espeakf.pl
export DTK_PROGRAM
elif [ "$CL" = "-d" ]; then
DTK_PROGRAM=dtk-soft
export DTK_PROGRAM
elif [ "$CL" = "-q" ]; then
INITSTR=""
else
CL_ALL="$CL_ALL $CL"
fi
done
export EMACS_UNIBYTE=1
export DTK_PROGRAM=/usr/local/src/espeakf/espeakf.pl
export DTK_TCL=/usr/bin/perl
exec emacs -q \
-l /usr/share/emacs/site-lisp/emacspeak/lisp/emacspeak-setup.el \
$INITSTR $CL_ALL
### end /usr/local/bin/emacspeak-espeakf
Both these files need to be made executable. I executed
chmod 755 emacspeak-*
in a shell as user ‘root’.
### End of document
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |