Comment 28 for bug 354522

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

Hi all,

Preface: I hope this is the last and final mega-post on this page.

Note to the developers: this bug has NOTHING to do with portaudio
and there is NO NEED to change the Ubuntu audio setup.

It was the wrong information in the espeak "ReadMe" file which made
me assume that this could have something to do with portaudio.

Everything looks as if the Ubuntu espeak packages have just been
copied from Debian without checking for pulseaudio compatibility.

Here is how I fixed espeak on Ubuntu-9.04-i386 with Gnome.

--- How to compile espeak with PulseAudio support on Ubuntu-9.04 ---

Using an Ubuntu-9.04-i386 DVD I did a Ubuntu "Desktop" installation
including a subsequent package update (May 11th 2009).

For a test I started orca by typing "orca" into the Gnome terminal
but instead of speech I got only weird noises.

I copied the ORIGINAL espeak source code from
http://espeak.sourceforge.net/download.html
into a sub-folder of my home directory:

bash ~/$ mkdir -p downloads/espeak
bash ~/$ cp espeak-1.40.02-source.zip ~/downloads/espeak

I unzipped the espeak source package and changed the working directory
to ".../espeak-1.40.02/src":

bash ~/$ cd downloads/espeak
bash ~/downloads/espeak$ unzip espeak-1.40.02-source.zip
bash ~/downloads/espeak$ cd espeak-1.40.02-source/src/
bash ~/downloads/espeak/espeak-1.40.02-source/src$

I modified the Makefile in the espeak "src" directory by typing:

bash ~/downloads/espeak/espeak-1.40.02-source/src$ gedit Makefile

With gedit I changed the AUDIO settings in the Makefile as shown below
and saved the modified Makefile back to disk.

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

To be able to compile espeak with pulseaudio support I needed
the following Ubuntu packages to be installed:

build-essential
libpulse-dev (including all dependencies)

Then I typed "make", "sudo make install" and "sudo ldconfig":

bash ~/downloads/espeak/espeak-1.40.02-source/src$ make
bash ~/downloads/espeak/espeak-1.40.02-source/src$ sudo make install
bash ~/downloads/espeak/espeak-1.40.02-source/src$ sudo ldconfig

Now, if I type "orca", I get speech instead of weird noises.

There is NO NEED to change anything in the Ubuntu-9.04 audio setup.

------------------------- Emergency Rescue ----------------------------

Because there is no "uninstall" target defined in the espeak Makefile,
here is how to remove a self-compiled espeak from a Ubuntu system:

sudo rm -f /usr/bin/espeak
sudo rm -f /usr/lib/libespeak.a
sudo rm -f /usr/lib/libespeak.so
sudo rm -f /usr/lib/libespeak.so.1
sudo rm -f /usr/lib/libespeak.so.1.1.40
sudo rm -f /usr/include/espeak_lib.h
sudo rm -rf /usr/share/espeak-data

Then re-install the following Ubuntu packages:

espeak
espeak-data
libespeak1

If I now type "orca" I get exactly the same weird noises as before. :-)

- edgar