maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Newbie (https://talk.maemo.org/forumdisplay.php?f=26)
-   -   Text2Speech for the N800 (https://talk.maemo.org/showthread.php?t=15350)

tj110158 2008-01-19 04:26

Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
I installed flite but can not find it to try it out. How does it work ?

luca 2008-01-19 20:37

Re: Text2Speech for the N800
 
open a terminal and type

Code:

flite "hello world"
to know all the options

Code:

flite --help

tj110158 2008-01-19 21:53

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
Quote:

Originally Posted by tj110158 (Post 130678)
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.

Quote:

Originally Posted by tj110158 (Post 130678)
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

Re: Text2Speech for the N800
 
@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

Re: Text2Speech for the N800
 
[QUOTE=luca;130646]open a terminal and type

Code:

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

Re: Text2Speech for the N800
 
There are also python bindings for the flite library.

http://powertwenty.com/kpd/blog/inde...-flite-wrapper

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

luca 2008-01-20 00:57

Re: Text2Speech for the N800
 
Quote:

Originally Posted by linux_author (Post 130727)
- that would be:

file -t "hello world"

flite "hello world" also works:


Code:

$ 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

Quote:

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

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
Quote:

Originally Posted by geneven (Post 130790)
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

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
shame the speakers are so quiet, even maxed out they arn't that loud on my N800.

-Rip

Rocketman 2008-01-20 10:34

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
1 Attachment(s)
Quote:

Originally Posted by tj110158 (Post 130678)
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:
Code:

#!/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

Re: Text2Speech for the N800
 
Quote:

Originally Posted by luca (Post 130732)
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

Re: Text2Speech for the N800
 
Thank you all for your comments they were HELPFUL.

free 2008-01-20 19:23

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
It won't work if we installed gnummeric. A note for whoever wants to try this !!!

Johnx 2008-01-20 23:45

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
Quote:

Originally Posted by Johnx (Post 131179)
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

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
Quote:

Originally Posted by rdcinhou (Post 144762)
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

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
No, unfortunately.

tj110158 2008-02-29 03:50

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
It should be in the directory you were in when you executed that command; presumably /home/user/.

lud666 2008-07-17 00:17

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
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
Quote:

espeak "Hello world"
but it needs
Quote:

espeak -w file.wav "hello world" && mplayer file.wav
Is there something I'm missing?

pamadio 2008-10-18 20:46

Re: Text2Speech for the N800
 
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

Re: Text2Speech for the N800
 
Quote:

Originally Posted by pamadio (Post 234582)
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

Re: Text2Speech for the N800
 
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


All times are GMT. The time now is 05:33.

vBulletin® Version 3.8.8