PDA

View Full Version : Text2Speech for the N800


tj110158
2008-01-19, 04:26
Hey Everyone
I am new to Linux (Maemo) and know nothing, and I've been searching for a Text2Speech program for my N800. I found a program that works with Linux and was wondering if I can install it on the N800. If someone would kindly take a look and tell me if its possible I would surely be greatful.

http://www.nch.com.au/verbose/index.html

Thanks in advance for any and all the help you may provide me in this matter.

baksiidaa
2008-01-19, 05:52
There's already a text-to-speech program that works on the N800. It's called flite, and it's in the maemo Extras repository.

Kathy
2008-01-19, 15:26
I installed flite but can not find it to try it out. How does it work ?

luca
2008-01-19, 20:37
open a terminal and type

flite "hello world"

to know all the options

flite --help

tj110158
2008-01-19, 21:53
People, the program that I'm looking for will read any highlighted text I choose, not text from a prompt. It will read "webpages, ebooks, proof read letters I type, things like that." I know its out there somewhere because Windows and Mac have them. The real question I had is "Can I use any Linux Program on the Nokia N800" or does it have to be made for Maemo?

johnsto
2008-01-19, 22:34
People, the program that I'm looking for will read any highlighted text I choose, not text from a prompt. It will read "webpages, ebooks, proof read letters I type, things like that." I know its out there somewhere because Windows and Mac have them.

I haven't seen any myself I'm afraid.

The real question I had is "Can I use any Linux Program on the Nokia N800" or does it have to be made for Maemo?

The simple answer: It has to be made for Maemo.

The accurate answer: It depends on the nature of program. Usually the more complex it is, the less easy it is to port to the Maemo platform.

brendan
2008-01-19, 22:37
@tj110158

flite will read text from a file and synth it into a voice. i think its the -t or -f parameter and the path to the file you want "read". it is not really intelligent, so you may get some weird stuff like special characters being verbalized.

as for your real question, many linux apps will work, but most will need to be ported for the platform. the processor does not have the same horsepower or instruction set as a desktop/laptop so some functionality has to be stripped or massaged to work on the device. then the code has to be compiled with a compiler that optimizes the code for the arm processor.

linux_author
2008-01-20, 00:37
[QUOTE=luca;130646]open a terminal and type

flite "hello world"

- that would be:

file -t "hello world"

(at least for 1.3)...

tks for posting this; i was pleasantly surprised to find flite 1.3 for both os2007 and os2008...

i like the voice under os2008 better...

kudos to the programmer for this port!

flite opens some nice possibilities for notification, alarm events, and other utilities, such as talking weather reports and news headlines!

reb402
2008-01-20, 00:47
There are also python bindings for the flite library.

http://powertwenty.com/kpd/blog/index.php/python/pyflite-flite-wrapper

I have only had a quick look, but it should compile OK for the IT.

luca
2008-01-20, 00:57
- that would be:

file -t "hello world"


flite "hello world" also works:



$ flite --help
flite: a small simple speech synthesizer
version: flite-1.3-release October 2005
CMU Copyright 1999-2005, all rights reserved
usage: flite TEXT/FILE [WAVEFILE]
Converts text in TEXTFILE to a waveform in WAVEFILE
If text contains a space the it is treated as a literal
textstring and spoken, and not as a file name




flite opens some nice possibilities for notification, alarm events, and other utilities, such as talking weather reports and news headlines!

Pity that it only speaks english

geneven
2008-01-20, 04:42
Pity that it's not that good of a voice, for general purposes, anyway. I'm currently listening to Tom Jones in Windows, using a voice from AT&T called Crystal, which is much better than anything in Linux I've been able to find.

dblank
2008-01-20, 09:23
using a voice from AT&T called Crystal, which is much better than anything in Linux I've been able to find.

I'm pretty sure AT&T Natural Voices was once available for Linux (x86, anyway), good luck finding it, though :)

I like the Cepstral voices too, and they're much cheaper (but no ARM binaries, of course..)

Rocketman
2008-01-20, 09:39
I would love to see text to speech integrated into FBReader. The specific use case would be as a way to continue reading while walking or piped through the car stereo while driving. Hopefully, FBReader would continuously indicate the word being spoken on screen by underlining, bolding or changing the color of the text. Even if FBReader just piped the current screenful of text to flite, waited for it to terminate, went to the next page and repeated would be useful, if not ideal.

RipTorn
2008-01-20, 10:13
shame the speakers are so quiet, even maxed out they arn't that loud on my N800.

-Rip

Rocketman
2008-01-20, 10:34
Well, if I was walking I would be using headphones and if driving it would be piped through my car stereo, so the overly quiet speakers (my observation as well on 810) wouldn't be an issue.

Johnx
2008-01-20, 13:31
People, the program that I'm looking for will read any highlighted text I choose, not text from a prompt. It will read "webpages, ebooks, proof read letters I type, things like that." I know its out there somewhere because Windows and Mac have them. The real question I had is "Can I use any Linux Program on the Nokia N800" or does it have to be made for Maemo?

This is a cool idea! I can't really think of a way that I could use this, but that's never stopped me from trying a quick hack in the past. :D Without further ado, I give you a JohnX exclusive "Crappy Hack!"

What you need:
0) some method to be root: becomeroot, openssh-server or r&d mode.
1) osso-statusbar-cpu (search for it on gronmayer.com/it)
2) libxmu6 from: http://repository.maemo.org chinook/free
3) flite
4) My freshly compiled xclip attached to this post. :D
5) this script: #!/bin/sh

DISPLAY=:0 flite "$(xclip -o)"
Copy and paste this text into "Notes" on your tablet. Then open the menu, select Format -> file format -> Plain text and save it to the Documents folder as "selection2speech"

What to do:
1) Install osso-statusbar-cpu and libxmu6. To install libxmu6 you will need to use the command line ("X Terminal"). As root type this:
apt-get install libxmu6
2) install xclip, attached to this post. You will need to do so from the command line as root:
dpkg -i xclip_0.08-7_armel.deb
3) When you see the osso-statusbar-cpu app in your status bar, tap on it, then Settings... -> Commands -> New. For Description put whatever you want. For command type this exactly:
sh /home/user/MyDocs/.documents/selection2speech.txt
4) Now try it out. Hilight some text then click on osso-statusbar-cpu, find the command you put there and tap it. A hideous robotic voice should read the selection. :) If it doesn't work you get to keep this pieces. :) What a deal!

If anyone wants to package this better go ahead. It won't hurt my feelings, I prmoise. :D

-John

linux_author
2008-01-20, 18:25
flite "hello world" also works:


- ackpht! you are *correct*! tks!

- just finished building the elinks text-only browser for armel and a script to download, modify, and then speak the local weather conditions!

- yahoo! i *love* the n800!

:-)

- the script uses elinks' -dump option... for example, to get a quick market update:

elinks -dump http://us.m.yahoo.com/p/finance?t=ms&tsrc=rawfinance

(dump output to file, sed file, have flite read it, etc.)

tj110158
2008-01-20, 18:26
Thank you all for your comments they were HELPFUL.

free
2008-01-20, 19:23
Let's hijack the thread

Johnx how did you built xclip? Especially how did you use the IMakefile to generate the makefile? Did you also port xutils-dev or did you do some steps out of scratchbox? Or you copied some stuffs from your PC to /scratchbox/devkits/whatever?

I'm interested to know how you did it..

Very nice hack by the way!

edit:
I've put xclip in my repository. No need to install manually xmu, it's automagic

nhanquy
2008-01-20, 21:55
It won't work if we installed gnummeric. A note for whoever wants to try this !!!

Johnx
2008-01-20, 23:45
nhanquy: What happens if you have gnumeric installed? Is there a conflict?

free: In scratchbox I set my target to ARMEL, then under mud-builder: cp packages/bc.xml packages/xclip.xml . (There's nothing special about bc.xml except that it's the simplest example). I tried to get and compile xclip but it failed to find xmkmf . At that point I almost gave up, but I gave a quick build of xutils-dev a try...and it worked! I installed the xutils-dev.deb under scratchbox, and compiled up xclip no problem.

free
2008-01-21, 07:43
Thanks Johnx for the details.

I was lazy and didn't want to build xutils-dev so I created the makefile out of scratchbox. Then I modified the makefile to fit to armel and started the build with skipping xmkmf.

nhanquy
2008-01-21, 08:03
nhanquy: What happens if you have gnumeric installed? Is there a conflict?


It complains about the libart and won't install. By the way, can we copy the on-screen highlighted buffer or the copied buffer into a shell script?

Johnx
2008-01-21, 09:25
Hmm...That's no good. I don't have gnumeric installed. If I get around to installing it later I'll try and see what's up with the conflict. No promises, though.

a script is just a text file so all you have to do is make a new file in Notes, set the format to plain text and hit paste. Just remember that whatever you save in "plain text" format will have a .txt added even if you didn't include one in the filename.

-John

free
2008-01-21, 09:38
I have xclip and gnumeric installed on OS2008. No problem with libart
?

The app manager log would probably help

tj110158
2008-01-25, 04:56
Update (Jan 24-2008)
Hey People

I think I found a program that will work, but with me not knowing anything about the Linux System and how it works, I hope that someone with check out the provided link and let US know. The Program is called ESpeak and is only 700K

http://espeak.sourceforge.net/

geneven
2008-01-25, 06:07
I just installed it in Ubuntu. The default voice is loathesome. In text to speech, smallness of a program does tend to vary directly with quality.

BTW: In the somewhat related field of speech recognition, a beta of a new program for the Mac got a rave review, saying it was almost on a par with Dragon NaturallySpeaking. The price was quoted at $200.

pipeline
2008-01-25, 12:15
lotta cool stuff here... anyone know how to poll pop email inboxes for new mail every n minutes and read subject lines of new mails so that similar script could be made? dont know if thats possible from xterm.

rdcinhou
2008-02-19, 18:22
Does anyone know of a way, short of recompiling where you could change the voice of flite from male to female?

Benson
2008-02-19, 20:31
Does anyone know of a way, short of recompiling where you could change the voice of flite from male to female?

No, you can't. Flite is designed to be able to use any festival voice without too much modification, but the way it's optimized for embedded use is by compiling a voice in. So changing voices shouldn't be all that much beyond a recompile, but it has to be recompiled.

arundba
2008-02-28, 22:30
any other GUI tool or program to work with N800 -os2008?
in Opera browser we have the voice read (v) option as similar to that?

geneven
2008-02-28, 22:52
No, unfortunately.

tj110158
2008-02-29, 03:50
Arundba
I found a couple of options, the first being to install KDE and use a program called "KSAYIT", but I first will have to learn how to install the KDE program.
The second is, I did a internet search for "ONLINE TTS" programs and found a demo of the same program I use on my Vista machine, which uses the AT&T Naturally Speaking Voices. But, since its there demo that is a text limit on use. If anyone wants to check it out, the URL is: http://www.research.att.com/~ttsweb/tts/demo.php
NOTE: Just type any text you want in the box and press the "SPEAK" button and/or save your text to a .wav file. I make a short-cut to this program just to show my friends. The voice quality is very very good.

moshing
2008-07-15, 20:23
hellllllp

i've eventually got flite installed and working on a n800 and a n810, but i cannot find the .wav file that it is supposed to create? the search cannot find it either? dose anyone out there know where my .wav went?

i got in touch with the guy that made flite and checked i was typing the correct thing, flite -t "hello world" -o test.wav, and it dose not create an error... so what happened to my .wav?

please please help

i'll draw you a nice drawing

ddw

Benson
2008-07-15, 20:28
It should be in the directory you were in when you executed that command; presumably /home/user/.

lud666
2008-07-17, 00:17
Flite installed fine on my n810 and works with the -t option but not the -f option. When it tries to read a file it just makes ungodly static (I didn't know that quiet little speaker could make so much noise!). I am typing
flite -f textfile
or
flite -f /home/user/textfile
It reads text from the command line just fine.

UPDATE

When I tried
flite -f textfile -pw
it read the file with several voices reading different parts of the file at once. ODD.

benny1967
2008-10-18, 20:10
I found espeak in extras and thought it would be cool to have it talk to people in the other room via ssh... :D

Problem is: I can make it output a wav file and play this file with mplayer, but I cannot make it talk without writing the output to a file. It should work like
espeak "Hello world"
but it needs
espeak -w file.wav "hello world" && mplayer file.wav
Is there something I'm missing?

pamadio
2008-10-18, 20:46
I pushed espeak in extras, but i was not able to compile it with "native" sound output.

The workaround is to use gstreamer:

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

benny1967
2008-10-18, 21:00
I pushed espeak in extras, but i was not able to compile it with "native" sound output.

Thanks... so at least I know I didn't miss anything here. The gstreamer-workaround ist better than my mplayer-thing:; at least it stops after the text. the wav-file goes on and on and on...

penguinbait
2008-10-20, 19:40
Well, for those that don't know, using KDE you can use Text2speech and read webpages, chats read as they sent to you, or other docs.

All this using flite

Additionally you can get more voices in my festival package

This has 8 voices, 1 female, 1 Spanish, 1 brit, and 1 scottish the rest are US.
http://penguinbait.com/festival-multi.deb (20MB Download, 50MB uncompressed, takes up about 35MB on flash)

This is Spanish voice only
http://penguinbait.com/festival-spanish.deb (4MB Download, 12MB uncompressed, takes up about 8MB on flash)

These both install to /home/user/festival

Additionally a shell script called flite is created to allow spanish voices to be used in maemo-mapper. Gnuite is making an update to MM to support this.

For now, the flite script by default uses spanish, it can be changed just edit the file, I included all the voices in it, you just need to adjust the comments.

flite -t no habla espanol

Basically it just a dumb script which ignores the first parameter, no matter what the parm is
flite xxx no habla espanol

gokuman56
2009-06-14, 03:44
i still cannot figure out how to make my nokia talk can someone clear this up and make it simpler

Thesandlord
2009-06-14, 04:13
install rootsh
open terminal

type root
type apt-get install flite
after it installs, close the terminal
open a new terminal
type flite "how are you gokuman56"

look, the tablet just talked! I am easily amused, so I find hours of entertainment making it say stupid things (like I like to eat purple tigers with billiard balls)

gokuman56
2009-06-14, 04:48
thank you soooooooooooooo much

qole
2009-06-14, 06:36
penguinbait's huge festival package with the sexy female voice is my favorite way to make my tablet talk. I get her to say... oh never mind.

jcharpak
2009-06-15, 15:03
penguinbait's huge festival package with the sexy female voice is my favorite way to make my tablet talk. I get her to say...

"passport"



( Sneakers (http://en.wikipedia.org/wiki/Sneakers_(film)) reference for those who haven't seen the movie)

FRZ
2009-06-15, 15:24
thank you soooooooooooooo much
yeah, I say thanks too cause I have forgotten about this neat little program. I need to save it somewhere on my SD card so if I ever reflash or reclone again I won't forget to reinstall it.

grog
2009-06-15, 17:25
Well, for those that don't know, using KDE you can use Text2speech and read webpages, chats read as they sent to you, or other docs.

All this using flite

Additionally you can get more voices in my festival package
Hey penguinbait. Thanks for the packages. Any chance there's been a repository set up somewhere that I can add to install instead (better for those re-flashing exercises)? TX

blowfish23
2009-06-15, 22:18
I think I just found an answer to the "Pronounce Maemo" thread (http://talk.maemo.org/showthread.php?t=2994). According to the flite guy, it's "mul-o" with a very very light emphasis on the 'L'.

dantonic
2009-09-17, 02:50
hi, can't find flite in the extras, what is its repository?

thanks

qole
2009-09-17, 18:34
You might need to enable Chinook extras. :(

dantonic
2009-09-17, 22:18
You might need to enable Chinook extras. :(

Yes, that worked! thanks a lot!

dantonic
2009-09-17, 23:04
trying to install flite and festival.

whether i try installing one first and then the other or vice versa i get the same error about the `/usr/bin/flite':
"/home/user # apt-get install flite
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
flite
0 upgraded, 1 newly installed, 0 to remove and 125 not upgraded.
Need to get 0B/2066kB of archives.
After unpacking 2675kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
flite
Install these packages without verification [y/N]? yalled.)
Unpacking flite (from .../archives/flite_1.3_armel.deb) ...
dpkg: error processing /var/cache/apt/archives/flite_1.3_armel.deb (--unpack):
trying to overwrite `/usr/bin/flite', which is also in package festival-multi
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/flite_1.3_armel.debE: Sub-process /usr/bin/dpkg returned an error code (1)
/home/user # "

any ideas?

qole
2009-09-18, 00:26
you don't need both. Festival is the full version (with lots of different voices including Spanish), flite is the "lite" version of festival (with only one robotic-sounding voice). If you're installing festival-multi, you've got everything you need.

dantonic
2009-09-19, 10:46
you don't need both. Festival is the full version (with lots of different voices including Spanish), flite is the "lite" version of festival (with only one robotic-sounding voice). If you're installing festival-multi, you've got everything you need.

Thank you,

I was looking for documentation on how to use it, going off of the manual. Can't seem to get it to speak.

when I try the command "festival" I just get a "not found"

Thor
2009-11-03, 19:38
Will there be an N900 version of a Text to Speech software?

I found one for free on the Blackberry last night called drive safe.ly which is quite good, and it would be great if we could have that on the N900, and even better if it can read out everything, say a book or an internet article for example.

ichmoimeyo
2009-11-05, 04:26
... and even better if it can read out everything, say a book or an internet article for example.
hi Thor:
... if you are connected to the internet you could always just copy&paste into:

http://imtranslator.com/default.asp

1) I recommend registering [no spam] for a free account to overcome the text input limit
2) they use some of my favourite voices from loquendo (http://tts.loquendo.com/ttsdemo/default.asp?page=id&language=en)
3) you don't have to translate - just hit the the "Say It" button

cheers

edit:
the imtranslator works fine in my n800 browser.

sa110_mk
2010-03-13, 07:09
install rootsh
open terminal

type root
type apt-get install flite
after it installs, close the terminal
open a new terminal
type flite "how are you gokuman56"

look, the tablet just talked! I am easily amused, so I find hours of entertainment making it say stupid things (like I like to eat purple tigers with billiard balls)

I followed the above instructions on my N900. Flite does indeed install. However when I type: flite "hello there" or whatever, all I get is a slight crackle from the speaker. Is there anything else that I need to install?

andraeseus1
2010-05-12, 04:28
any chance in getting a gui for this?