[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]

New to Emacspeak - The Red Hat experience (long)



New user Installing emacspeak - The Red Hat experience.

Prerequisite: Not much.

Introduction:
As a supplemental to a previous thread (Advice for a new user)
Here are my notes from my experience installing emacspeak on a fresh Red 
Hat 9.
The ordering of the sections/events is chronological, but not necessarily
logical ;-)

The first 3 steps may be considered off-topic, people who know their way
around GNU/Linux should feel free to skip them.
These steps still might be useful if you're in a culture shock, though.
 
About notation: I am using the $ (dollar) symbol as the beginning of command
lines that I have executed (either from a terminal or from an Emacs shell
buffer).
Of course, you'll need to try them yourself because as my familiarity with
Emacs grew, I started using dired mode commands instead of typing them in  
a shell (so I might have forgotten few change directory commands here and
there).
I also stopped tracking where I'm root and where I'm not because at one 
point
I started using multiple terminals for that. If you see that one of the
commands results with "permission denied" you'll know that you need to:
$ su

I have written this in a style that should allow one to follow-me 
follow-me,
even if he/she is completely clueless, but someone will have to try this 
out,
(probably with a little rewriting/adaptation to other distributions).

Let's go.

1. Download and burn Red Hat 9 CD #1 to CD #3.
One can use ftp.redhat.com or (faster) bittorrent for that.
Note that you can actually buy these CDs instead, as a token of good 
will toward
Red Hat developers.
(I know that Free speech is not the same as Free beer.
 But when the price is zero, what's the difference, who cares?).

2. Reboot from CDROM and Install the system.
I have chosen to install using the graphical display and also
chose the workstation among the suggested setups (I knew I'll need GCC 
sooner
rather than later so desktop setup would probably not be good enough, I 
can't
rationalize why I didn't choose the server setup, I didn't choose the
customized setup because I wanted to get over with the installation as
quickly as possible).
The rest of the installation is practically clicking "yes, yes, yes, next,
next, next".
I was surprised that the sound test was successful (remembering that Red 
Hat
8.0 didn't get along with my sound hardware), which means that I will 
not need
to compile ALSA today.

3. Now I was stuck. I couldn't connect to the internet as my USB ADSL modem
was not supported by this distribution yet.
 From my previous GNU/Linux experience I knew that I have to get an eciadsl
driver.
Unfortunately, NTFS was not supported, so even if I had the software 
packages
that I needed on my Windows partition, I would not be able to access them.
Fortunately I was able to use an internet connected computer + CD burner for
getting and burning that ADSL driver (eciadsl-usermode-0.7).
The installation process of that driver, along with mplayer (a video/audio
playback utility) is clearly beyond the scope of this text.

Let's just say that in order to proceed further with Emacspeak I needed to
verify that my system has some basic functionality.
I checked that by using commands like:
$ wget www.gnu.org
Got index.html in the working directory, which means that my internet
connection is OK.
$ mplayer am_I_a_pirate.mp3
If it can play sound files, surely it can synthesize speech.

I later also installed lynx so I'll be able to surf and download stuff 
without
going to graphical mode.
I think that this will also help me improve my not-using-a-mouse skills 
(even
 though there's nothing wrong with Mozilla or other preinstalled browsers).

4. On with the emacspeak installation:
In order to get the software packages that I need, I have used google to 
search
for the terms "emacspeak", "espeakf", "eflite" and just followed the links.
I ended up with the following things to do:
* wget 
http://heanet.dl.sourceforge.net/sourceforge/emacspeak/emacspeak-18.tar.gz
$ tar zxvf emacspeak-18.tar.gz
$ cd emacspeak-18.0
$ less README
$ make config

That command failed with the error:
"
emacs -batch -q -no-site-file -l cus-dep.el -f custom-make-dependencies "."
Cannot open load file: cus-dep.el
make[1]: *** [cus-load.el] Error 255
make[1]: Leaving directory `/home/barak/downloads/emacspeak-18.0/lisp'
make: *** [config] Error 2
"

Maybe the error happend because I was running it from an Emacs shell buffer?
Trying the same command from the command line didn't help.
Check if the README/INSTALL file has something about it.
README points to Makefile, INSTALL file nonexistent.
The Makefile comments tell me that I should do
$ make config SRC=`pwd`
Didn't help. Ok, maybe I'll check it later, trying the RPM package.
$ rpm -i emacspeak-18.0-1.i386.rpm
"error: Failed dependencies:
    tclx is needed by emacspeak-18.0-1"

Ok, here's tclx package on cd #3.
$rpm -i /mnt/cdrom1/RedHat/RPMS/tclx-8.3-88.i386.rpm
"error: Failed dependencies:
    libtk8.3.so is needed by tclx-8.3-88"

What have I done to deserve this?       
(BTW, I saw no graphical tool to handle these specific packages, except for
right clicking the rpm file which didn't work neither).

RedHat CD #3 contains emacspeak-17.0 RPM, with a similar dependency 
nightmare.
Going like crazy over every package that seems relevant and doing "rpm -i"
was futile.

5. Short break:
Interstingly, RedHat CD #1 contains README-Accesibility which refers to
Emacspeak.
It also mentions w3 and recommends installing it by
$ rpm -ivh ftp://people.redhat.com/jlamb/w3-4.0pre.44-1.i386.rpm
Luckily no dependencies this time.
Running it from Emacs doesn't seem to work, though:
"Cannot open load file: w3-e21".

6. Completing Emacspeak package build:
Let's try Emacspeak 17 from source, or shall we go doing something else?
Remembering the original Emacspeak 18 error I tried to locate the 
missing file.
 From Emacs, the command M-x locate, with cus-dep.el as parameter yields:
    /usr/share/emacs/21.2/lisp/cus-dep.elc
Oh, I see. The RedHat installation had a byte-compiled version of the
 cus-dep.el file that Emacspeak needs.

So if I had installed Emacs from source everything would just be fine,
right?
$ wget ftp.gnu.org/gnu/emacs
got index.html
I browsed it using lynx and learned that if I want to be updated and stable
I'll need to get emacs-21.3.tar.gz
(I should probably set up my Emacs so that the command browse-url-of-buffer
will use lynx as default).
$ wget ftp.gnu.org/gnu/emacs/emacs-21.3.tar.gz
$ tar zxvf emacs-21.3.tar.gz
Skimming through the README and INSTALL files reveals that what I need to do
is:
$ ./configure
$ make
as root:
$ make install
And that's all is needed from the GNU Emacs side.

So I came back to the extracted emacspeak-18.0 directory and type
$ make config
Yes!
No errors, and it told me "Now type make emacspeak".
$ make emacspeak
Again, smooth, no errors, and it told me:
"Now check installation of  the speech server.
See Makefile for instructions."
And I did.
The most important piece of information is that Emacspeak is using
tcl and I should probably have one before moving on to eflite/espeakf.
$ which tcl
"/usr/bin/which: no tcl in 
(/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/barak/bin)
".
Oh no, not again. I was sure that my earlier rpm bashing had installed tcl
at least 3 times.

7. Installing tcl
Forget the RPM, I'm going to the source.
Where can I get it?
Google for "tcl", "download" .
www.tcl.tk is the place.
It also has precompiled binaries, so it's ok if I chicken.
Using lynx for downloading the files failed so I had to switch from my
comfortable text terminal back to X and launched Mozilla.
I later learned that when using lynx, downloading a file and saving a file
are two different actions (one doesn't mean the other, yes to one may be 
a no
 to the other).

I guess that's a proper place to mention that Control-Alt-F1 up to
Control-Alt-F6 key combinations switch between various text terminals
(easier to read with my glaucoma) and Control-Alt-F7 brings us back
to the graphical screen.

Anyway,
$ tar zxvf tcl8.4.2-src.tar.gz
simile with README, unix/README.
$ cd tcl8.4.2/unix
$ ./configure
$ make
as root
$ make install

$ which tcl
still can't find it.
Reading the unix/README and the output of "make install" gave me an idea:
maybe I'll just do as root:
$ ln -sf /usr/local/bin/tclsh8.4 /usr/local/bin/tcl

Am I sure that I know what I'm doing? The next steps will tell.

8. Install a speech synthesizer.
Unlike espeakf, I already got eflite to work in the past, so I probably
should start with what I know.
Now might be a good time to freshen up my memory with
https://www.emacspeak.org/VCCS-archive/msg01099.html
in order to prepare for the next steps.
There is no harm in typing
$ make install
from the directory where I've extracted and built emacspeak-18.0d, as 
I'm going
to use the other scripts anyway.

$ tar zxvf flite-1.2-release.tar.gz
$ cd flite-1.2-release
checking out README (no INSTALL file, but the README has the info)
Even if you are not a programmer, It is always interesting to browse the
soruce directory.
For example, while checking the COPYING file, I learned that flite is free
software but released under a different license than the GPL.
$ ./configure
$ make
No, the computer is not dead. It's just compiling very large files.
Ok, it is stuck for too long in:
" gcc   -I../../lang/usenglish  -I../../lang/cmulex -I../../include -g 
-O2 -Wall    -c cmu_us_kal16_diphone.c -o cmu_us_kal16_diphone.o"

Let's change -O2 to -O0 and hope that it will solve it.
$ cd ~/downloads/flite-1.2-release/lang/cmu_us_kal16/
$ gcc   -I../../lang/usenglish  -I../../lang/cmulex -I../../include -g 
-O0 -Wall    -c cmu_us_kal16_diphone.c -o cmu_us_kal16_diphone.o
Few minutes later...
Well, I'm killing it.
(Later Examination of the C file reveals that optimization level probably
doesn't matter in this case, as we are compiling a file with very large
data arrays).
Compilers, can't live with them, can't shoot them.

Let's see if we have any alternative on the system.
$ gcc
(and pressing tab instead of enter)
Found gcc296, not an _official_ GCC release but still one of my favorites.
$ gcc296   -I../../lang/usenglish  -I../../lang/cmulex -I../../include 
-g -O0 -Wall    -c cmu_us_kal16_diphone.c -o cmu_us_kal16_diphone.o
That almost worked like a charm, except for the following  message:
"/tmp/ccqPRq3D.s: Assembler messages:
/tmp/ccqPRq3D.s:2165899: Warning: .stabs: description field '10002' too 
big, try a different debug format"

I give up building flite, let's see what about eflite

$ tar zxvf eflite-0.3.6.tar.gz
$ cd eflite-0.3.6
Tired of typing configure make and make install, maybe I'll prepare a
script called "the_usual_please.csh" .
But not this time:
The INSTALL also tells me that configure needs to accept an additional 
switch,
so I configure it like this:
$ ./configure flite_dir=/home/barak/downloads/flite-1.2-release
The INSTALL file tells me that I don't need to install flite, I only need
flite libraries, so maybe it will work after all without successfully 
building
flite.
$ make
Surprisingly, the make process is finished successfully.
$ make install

Now I prepare the emacspeak-eflite script as discussed in the emacspeak
mailing list archives:

#!/bin/sh
## /usr/local/bin/emacspeak-eflite - execute emacs with speech enhancements
## use EFLITE

## based on
#$Id: emacspeak.sh.def,v 17.0 2002/11/23 01:29:08 raman Exp $

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_TCL=/usr/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

$ chmod +x emacspeak-eflite
$ cp emacspeak-flite /usr/local/bin

$ emacspeak-eflite
It's alive!!!

9. Make typing a bit more comfortable.
In order to minimize the number of awkward positions for my fingers.
I needed to exchange the location of Caps-Lock and Control.
(After blind typing for awhile in Emacs, you find out that you move a lot
using the Control and Alt/Meta keys, so you want to make your hand move as
little as possible before pressing it).

Ok, so where is emacs2.kmap.gz?

M-x locate with emacs2.kmap as parameter.
nothing, but I found:
/lib/kbd/keymaps/i386/qwerty/emacs2.map.gz
so opened the directory /lib/kbd/keymaps/i386/qwerty/ as an Emacs dired
buffer and executed the shell command on the file emacs2.map.gz by putting
point on the start of the file name, pressing the '!' key (that's 
exclamation mark) and typing "loadkeys " (without the quotation marks).
It worked. In which file  shall I put this command so that it will be 
invoked when system starts up?
I guess that  .bashrc is good enough, is it?
I've logged into another terminal and saw that it works.
I'll save the graphical user interface for later.

10. Time to festival.
It's late, give me a decent RPM, please.
rpmfind.net is where to go.
The search engine in that site gave a proper link where to download one such
rpm, a.k.a festival-1.4.2-16.i386.rpm
$ rpm -i festival-1.4.2-16.i386.rpm
Good, let's see that it works.
$ festival
Festival starts with an interactive prompt
$ (SayText "Please say something")
And it does.
$ (quit)

11. Going for espeakf.
$ cvs -d :pserver:anonymous@xxxxxxxxxxx:/cvsroot/espeakf 
login
$ (pressing Enter as password)
$  cvs -d 
:pserver:anonymous@xxxxxxxxxxx:/cvsroot/espeakf co espeakf
The README says that copying the .pl file is sufficient, but since we have
as Makefile with an "install:" rule, why wouldn't we just type:
$ make install
Wait, not so fast. the line saying "DESTDIR=" should be changed into 
something
more meaninguful, something like:
"DESTDIR= /usr/local/bin"
$ make install
That was stupid, should have read the Makefile more carefully.
Undo changing DESTDIR.

The README also says that I should do:
$ export DTK_TCL=perl
$ export DTK_PROGRAM=espeakf.pl
I wonder what will happen if I'll type
$ emacspeak
(instead of running a customized script)

Ok, Emacs is up and I face the same problem that I had on SuSE:
It will only say special characters '?' (question mark) and '#' (pound).
Wonder if I should debug it and improve my perl skills or should I just
switch to another distribution (Debian?) and see what's going on there.
Avoiding this problem won't make it go away, but I'll probably just
dismiss it for awhile.


-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help"


Emacspeak Files | Subscribe | Unsubscribe | Search