How to compile eSpeak-Chinese/1.47.11/eSpeak-1.47.11-source.tar.xz in Ubuntu 12.04 LTS

Asked by Julianloui

I have been trying to compile and install eSpeak 1.47.11 from source code (http://sourceforge.net/projects/e-guidedog/files/eSpeak-Chinese/1.47.11/eSpeak-1.47.11-source.tar.xz) according to eSpeak's instructions. Everything went all right until I issued 'make && make install' after modifying Makefile's AUDIO lines to attain

# AUDIO =runtime
# AUDIO =portaudio
# AUDIO =portaudio0
# AUDIO =portaudio2
     AUDIO =pulseaudio
# AUDIO =sada

<> <> <> <> <> I am listing the displayed output resulting from 'make && make install' below:

 g++ -o speak speak.o compiledict.o dictionary.o intonation.o readclause.o setlengths.o numbers.o synth_mbrola.o synthdata.o synthesize.o translate.o mbrowrap.o tr_languages.o voices.o wavegen.o phonemelist.o klatt.o sonic.o -lstdc++ -lpulse -lpthread

 wavegen.o: In function `WcmdqStop()':
 wavegen.cpp:(.text+0x38b): undefined reference to `Pa_AbortStream'
 wavegen.o: In function `WavegenOpenSound()':
 wavegen.cpp:(.text+0x439): undefined reference to `Pa_StreamActive'
 wavegen.cpp:(.text+0x44f): undefined reference to `Pa_StartStream'
 wavegen.cpp:(.text+0x4bc): undefined reference to `Pa_OpenDefaultStream'
 wavegen.cpp:(.text+0x51f): undefined reference to `Pa_OpenDefaultStream'
 wavegen.o: In function `WavegenCloseSound()':
 wavegen.cpp:(.text+0x543): undefined reference to `Pa_StreamActive'
 wavegen.cpp:(.text+0x587): undefined reference to `Pa_CloseStream'
 wavegen.o: In function `WavegenInitSound()':
 wavegen.cpp:(.text+0x5b9): undefined reference to `Pa_Initialize'
 collect2: ld returned 1 exit status
 make: *** [speak] Error 1

I'll appreciate hearing from anyone very much. This is my first attempt to compile/install a software package. Curently Ubuntu 12.04 provides only eSpeak version 1.46.02, but I need version 1.47.11.

Julianloui

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu espeak Edit question
Assignee:
No assignee Edit question
Solved by:
Julianloui
Solved:
Last query:
Last reply:
Revision history for this message
Thomas Krüger (thkrueger) said :
#1

Looks like the PA development files are missing. Is libpulse-dev installed?

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#2

No need to install from source code.

Installing from source should always be the last resort....

Please run these commands in a Terminal to install espeak 1.47.11:

sudo add-apt-repository ppa:berkon/ppa

sudo apt-get update

sudo apt-get install espeak

espeak --version

Terminal output of last command should then be:

eSpeak text-to-speech: 1.47.11 03.May.13 Data at: /usr/lib/x86_64-linux-gnu/espeak-data

Revision history for this message
Julianloui (julianloui) said :
#3

Tom and Mark,

Thanks very much for coming to my rescue.

(1) I am able to locate /libpulse-dev in /usr/share/doc and it contains the following:
README changelog.Debian.gz copyright example

(2) I have no trouble in carrying out Mark's first two commands but 'sudo apt-get install espeak' generates the following error message:

" The following packages have unmet dependencies:
   eSpeak: Depends: libspeak1 (>=1.47.11) but it is not going to be installed.
   E: Unable to corrrect problems, you have held broken packages. "

Julianloui

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#4

Please run the following commands in a Terminal:

sudo apt-get update

sudo apt-get install make autoconf automake libtool pkg-config

sudo apt-get install portaudio19

sudo apt-get install portaudio19-dev

sudo apt-get install libasound2-dev

sudo apt-get install libportaudio2

sudo apt-get install libportaudiocpp0

sudo apt-get install libwxgtk2.8-dev

sudo apt-get install libpulse-dev

sudo apt-get install libportaudio-dev

Then retry compiling espeak.

Source: https://github.com/rhdunn/espeak

Revision history for this message
Julianloui (julianloui) said :
#5

Mark,

Thank you for your continued help. I was able to run all you new commands successfully except the third one, namely 'sudo apt-get install portaudio19'. It produced the following output:

Reading package lists ...
Building dependency tree ...
Reading state information ...
E: Unable to locate package portaudio19

Julianloui

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#6

OK, skip that command.

Do the others complete successfully?

 Can you successfully compile espeak after executing ALL the Terminal commands?

Revision history for this message
Julianloui (julianloui) said :
#7

I meant I had success with 9 of your 10 new commands, but the third one failed.

I've just run 'sudo apt-get install espeak' and obtained the following Linux response, essentially the same libespeak1 problem:

Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 espeak : Depends: libespeak1 (>= 1.47.11) but it is not going to be installed

Julianloui

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#8

That's not what I wrote.

In post #4 and post #6, I asked you to RECOMPILE espeak, not to install it with apt-get.

So please try to compile and install espeak from source code.

The dependencies for using make && make install are now hopefully satisfied.

That is why I posted post #4, to try to install the missing dependencies BEFORE trying to recompile using sudo make && make install.

Revision history for this message
Julianloui (julianloui) said :
#9

I understood the intent of your new sequence odf commands. I am sorry that I was a little too hasty in answering your question. I've just re-compiled espeak 1.47.11 and obtained the same unhappy output as reported in my original Question.

I too have been doing some work in resolving this dependency issue. I hope with some patience I'll see some clues sooner or later. I love digging into not-so-easy problems and I feel that you've provided me sufficient hints. Many thanks again for your generous help.

Julianloui

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#10

If you cannot get this working in Ubuntu 12.04 LTS, I strongly suggest installing Ubuntu 13.10.

I tested both my procedures in Ubuntu 13.10 (installing binaries and installing from source) and they both work in Ubuntu 13.10.

Revision history for this message
Julianloui (julianloui) said :
#11

Mark,

Thank you for your very helpful new suggestion. I downloaded Ubuntu 13.10 the other night and will make a live DVD of it as soon as I obtain a blank DVD. I discovered that 13.10 occupies more than 800 MB, beyond the 700-MB capacity of a CD. I'll keep you posted.

By the way, what does Linux mean when it returns the following error in connection with a 'tar xjvf filename.tar.xz' command?

bzp2: (stdin) is not a bzp2 file.
tar: Child process returned status 2
tar:Error is not recoverable: exiting now

julianloui

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#12

I suggest creating a new question related to tar here:

https://answers.launchpad.net/ubuntu/+addquestion

Revision history for this message
Julianloui (julianloui) said :
#13

Mark,

I am happy to report that I have been able to fix my major eSpeak-1.47.11 problem by remaining with Ubuntu12.04. I've been working on eSpeak-Chinese for some time with much help from e-Guidedog. Even though my work still requires some fine tuning, all the system problems are gone. I am listing the employed procedure supplied by e-Guidedog below in case anyone wishes to use it to install eSpeak-Chinese. The problem reported by me in Post # 11 was due to a typo on my part arising from the inadvertent use of the lower-case letter 'j' instead of the expected upper-case 'J'. in the tar flag.

1. sudo apt-ghet install libpulse-dev

2. wget http://sourceforge.net/projects/e-guidedog/files/eSpeak-Chinese/1.47.11/eSpeak-1.47.11-source.tar.xz

3. rm -rf espeak-1.47.11-source

4. tar -xJf espeak-1.47.11-source.tar.xz

5. cd espeak-1.47.11-source/src

6. make

7. sudo make install

8. espeak -vzh 123 (testing for Mandarin)

9. espeak -vzhy 123 (testing for Cantonese)

Finally I wish to express my heart-felt thanks to Mark Rijckenberg and Cameron Wong of e-Guidedog for their indefatigable assistance and patience.

Julianloui

Revision history for this message
Julianloui (julianloui) said :
#14

Now that the question under consideration is resolved, I hereby close the post.

Julianloui