PDA

View Full Version : N800 and espeak


Mark69
2010-06-11, 08:40
Hello.

Iīm trying get espeak running on my N800.
I even did a reflash (RX-34_DIABLO_5.2008.43-7_PR_COMBINED_MR0_ARM.bin)
to be sure that there isnīt anything wrong with my running system.

The first thing I did, was installing espeak. Everything was fine and even the dependencies were installed (espeak-data + libportaudio2 + libespeak).
But the same happened as before:

no sound and this

wave_open_sound > Pa_OpenStream : err=-9996 (Invalid device). :(

What am I doing wrong? Is something missing?
Or doesnīt espeak really run on my N800? :confused:

I found something like this:

"The workaround is to use gstreamer:

espeak -v en --stdout "Hello world" |gst-launch -v fdsrc ! wavparse ! audioconvert!autoaudiosink

I think thatīs the next Iīm going to try out.

Flite works great, but to listen to flite trying to speak German (Navit) is quite funny. :D

Best regards

Markus

luca
2010-06-11, 14:39
I didn't even know that there was a port of espeak for the n800, are you sure it is supposed to work?
There was a port of festival by penguinbait (IIRC), but I never used it (too big for my taste).

Mark69
2010-06-11, 14:55
Hello.

Thanks for Your answer. :)

I thought this one is for the N800:

http://maemo.org/downloads/product/OS2008/espeak/

Am I wrong?
Itīs for OS2008. :confused:
And my N800 has OS2008 Version 5.2008.43-7.

I saw that there is a port of festival but itīs huge and no German voice. :(

Best regards

Markus

Mark69
2010-06-18, 15:04
:) This post was the one I was looking for:

http://talk.maemo.org/showpost.php?p=234582&postcount=38

- Install espeak.
- Install gstreamer-tools

http://maemo.org/packages/view/gstreamer-tools/

-> apt-get install gstreamer-tools

- X Terminal:
espeak -v de --stdout "Hallo Welt" |gst-launch -v fdsrc ! wavparse ! audioconvert!autoaudiosink

And it works! German voice. :)

Thanks for this great tip! :D

steffen800
2010-07-04, 09:05
i played around a little bit and found out how to listen to espeak without gstreamer.
one option ist to use mlayer to read from stdin:
espeak -v de --stdout 'Hallo Welt'|mplayer -
unfortunatly, mplayer dont recognize end of stream or espeak does't send it, so must press Ctrl C to stop mplayer.

second option need no additional install as it works with the (i think) on board command play-sound:
espeak -v de 'Hallo Welt' -w /media/mmc1/speak.wav && play-sound /media/mmc1/speak.wav

based on the latter option, i wrote me a little python script to listen to txt file line by line. At least for "-v de" it is not easy to understand the text, even when adjusting the -s and -g options(speed and word gap) of espeak.
Sometimes it sounds very clear, sometimes not.
One of those meant to be easy things which is still a challenge to artificial intelligence :)

gigapus
2010-07-14, 17:03
For what it is worth, I cannot get the play-sound solution to work. The espeak .wav file works in both mplayer and gst-launch solutions, but play-sound produces no sound at all, and no error is reported.

Mark69
2010-07-15, 06:46
Hi

Same for me:
mplayer doesnīt stop and play-sound gives me no sound. :(
That's a pity.
play-sound would be nice.

Maybe weīll find a solution... :confused:

gigapus
2010-07-15, 13:46
I was just playing around and found that changing audio output driver in mplayer to either alsa or esd (default was sdl) will stop playback and exit at EOF. Try it!

mplayer -ao alsa file.wav

The output is also a bit louder (sdl < esd < alsa).

Mark69
2010-07-17, 19:46
Yes gigapus, "mplayer -ao alsa file.wav" works fine. :)
And, steffen800, i found out that play-sound

(espeak -v de 'Hallo Welt' -w /media/mmc1/speak.wav && play-sound /media/mmc1/speak.wav)

also works.

But you have to set the system sounds to 1 or 2.
It seems that "play-sound" is linked to N800īs system sounds settings. :confused:

Does anybody know whether there exist any parameters for play-sound?
Or does play-sound only plays wave files?

Markus

Mark69
2010-07-17, 20:04
I found something very interesting in the web and it works! :D
You can use "play-sound" even if your system-alert sounds are set to none. :)

Have a look at this. It works.

http://blog.hacker.dk/2008/03/maemos-play-sound-low-volume-nokia-internet-tablet/?reffed=1

Kudos to Dan. ;)

gigapus
2010-07-17, 23:25
Good find! That play-sound hack does indeed work. However, I find that the sound is quite distorted, even at moderate volumes. mplayer+alsa is not as loud, but is more listenable.

As an aside, I'm using espeak with navit. The default English accent makes me feel like I am getting directions from Stephen Hawking!

Mark69
2010-07-18, 21:26
Stephen Hawking? :D
Yes, it sounds like him. Even in German.But he is brilliant. If someone knows the right way itīs him (Is that correct English?).:confused:

Youīre right. Mplayer sounds better.
Iīm using Navit, too. A great app.For free and powerful.
The next thing i will try is to use mbrola voices with espeak. That should work. Packages are available.

Kroll
2011-12-26, 11:39
Well I installed espeak and it works for me with espeak -v de --stdout "Hallo Welt" |gst-launch -v fdsrc ! wavparse ! audioconvert!autoaudiosink
What I have to do to make Navit speak? Or it will automatically speak before the turn?

gigapus
2011-12-29, 04:54
Making navit use espeak is fairly easy. In .navit/navit.xml I have a line like this:

<speech type="cmdline" data="/usr/local/sbin/navit-speech-wrapper %s"/>


The file specified above looks like this:

#!/bin/sh

espeak -ven-rp -s135 --stdout "$1" | mplayer -ao alsa -


Make sure that this file is executable. Navit should then speak!

Kroll
2011-12-29, 11:34
I have edited my navit.xml

What about second code? Just run it in xterm?

I installed flite too but it says only 2 first letters of phrase (for example instead "1225 meters turn right" it says only "12")
Thanks

gigapus
2011-12-29, 15:04
Sorry if I was not clear. The first code snippet I posted is a line in navit.xml that refers to another file, namely /usr/local/sbin/navit-speech-wrapper. This file should contain the contents of the second code snippet (altered as necessary to suit your espeak command line preferences). It must have execute permission, and can be located anywhere and named anything, as long as the path specified in navit.xml is correct. Navit will then run that command whenever speech output is required..

Kroll
2011-12-29, 20:37
Thanks! Now it makes sense for me.
chmod+x to make it executable?

gigapus
2011-12-29, 21:27
Yes, chmod +x will make it executable.