Comment 27 for bug 354522

Revision history for this message
edgar-rft (edgar-rft) wrote :

Hi all,

I only wanted to tell that after several days of reading all
the pulseaudio/portaudio/alsa specs over and over again I got
orca and espeak working on Ubuntu-9.04-i386 with Gnome.

The problem is that I have fiddled so much in the Ubuntu audio
configuration that at the moment I still have no EXACT idea what
the real problem was. But everything looks as if it has something
to do with the Ubuntu pulseaudio setup and NOT with portaudio.

I still will have to test the whole stuff again with a plain
Ubuntu installation, but this still will last some more days.

However, you will need to re-compile espeak yourself to make
it work. Here are the most important steps I did:

Download the ORIGINAL espeak source code from:

http://espeak.sourceforge.net/download.html

and unpack it into a sub-folder of your home directory.

Ignore the espeak "ReadMe" file because the instructions there
are rather useless and misleading for Ubuntu and pulseaudio.

In particular, you DO NOT NEED to adapt the "portaudio.h" files
in the "espeak/src" directory to compile espeak with pulseaudio.

I can compile espeak on Ubuntu with all "portaudio[xx].h" files
in the "espeak/src" directory deleted what makes me assume that
the Ubuntu problems have nothing to do with portaudio at all.

Now go into the "espeak/src" directory and modify the Makefile:

bash$ cd /.../espeak-1.40.02-source/src
bash$ gedit Makefile

Change the AUDIO setting in the Makefile from "portaudio" to
"pulseaudio" as shown below and save the modified Makefile
back to disk:

--- /espeak-1.40.02-source/src/Makefile ---
#AUDIO = portaudio
AUDIO = pulseaudio
#AUDIO = sada
--- end of /espeak-1.40.02-source/src/Makefile ---

Espeak will use the Ubuntu "/usr/include/pulse/pulseaudio.h"
file by default, you do not need to change anything else but
the Makefile (and maybe the Ubuntu pulseaudio setup, what
still needs to be verified by testing on a plain Ubuntu
install during the next days).

Now, in the "espeak/src" directory, type "make":

bash$ make

1. NOTE: espeak will NOT work correctly if started after "make"
from the "/espeak/src" directory, because it still loads the
non-working Ubuntu "/usr/lib/libespeak.so.1.1.40" library.

2. NOTE: First I had espeak installed in "/usr/local/bin" by
modifying the PREFIX setting in the Makefile but it didn't
work neither. The only way to make it work correctly seems
to install espeak in "/usr/bin" (where it finally worked).

3. BEWARE: "make install" will OVERWRITE the Ubuntu files
and there is no "uninstall" target defined in the Makefile!

The affected Ubuntu files are:

/usr/bin/espeak
/usr/lib/libespeak.so.1 # link to libespeak.so.1.1.40
/usr/lib/libespeak.so.1.1.40
/usr/share/espeak-data # the entire directory

Either copy the files to a safe backup-location before you type
"make install" or in case something goes wrong, you can restore
the original Ubuntu files by re-installing the packages:

espeak
espeak-data
libespeak1

The self-compiled espeak will also install the files:

/usr/lib/libespeak.a
/usr/lib/libespeak.so # also a link to libespeak.so.1.1.40

In case of an un-installation you may have to delete these files
yourself manually on the bash command line.

Now, after reading about all these quirks and warnings, if you're
still happy and in adventurous mood, type:

bash$ sudo make install

and try out wether espeak works now on your system. :-)

I will test the whole stuff again during the next few days.

- edgar