Re: etextRead activity and espeak

2009-02-16 Thread James Simmons
Tony,

I have some good news on TTS with Read Etexts.  It turns out that 
speech-dispatcher is available through yum update, and it does work on 
the XO.  If you follow the instructions at 
http://wiki.laptop.org/go/Read_Etexts#Using_Text_to_Speech you should be 
able to get Read Etexts to do TTS with working highlighting.

Now the bad news:

1).  You're going to have to adjust the Rate using the Speech toolbar 
tab down so that highlighting can keep up with speech.
2).  Read Etexts does not pause between paragraphs and may not pause 
between sentences.  I *really* need to fix this.
3).  My test environment for developing Read Etexts does not have TTS 
working properly yet.  It worked when I was using Xubuntu, but I cleared 
that off and replaced it with Fedora 10, which unlike the XO uses pulse 
audio.  You can configure speech-dispatcher to use pulse-audio, and it 
will seem to work, but not for long.  That's been my experience so far, 
anyway.  Without a robust TTS test environment I'm not going to be able 
to improve on what I have for awhile.  I haven't given up yet.
4).  You need to start the speech-dispatcher service using the Terminal 
before you can use TTS.  I know damned well that there is a way to start 
this when the XO boots up, but I don't know how to do it.  Perhaps one 
of the others on the mailing list can suggest something.

My wife is impressed that kids in Nepal might be using an Activity I 
wrote, and after seeing my demo of it she agreed the kids deserved 
better.  So she may tolerate more hours of basement hacking than she 
normally does.

I hope you'll try out Read Etexts with speech-dispatcher installed and 
let me know what you think.

Thanks,

James Simmons


Tony Anderson wrote:
 Hi,

 The educational team at OLENepal would like a 'karaoke-style' text 
 reader above all other activities on the XO. This is primarily for 
 English. Looking at the activity code, it looks like the speech code 
 is there but disabled.

 Would it be possible to release a version that supports espeak without 
 the Speech-Dispatcher pending its implementation in Sugar? This would 
 give us a chance to experiment with creating 'read-aloud' stories.

 Tony



  Thanks for your response.  I never questioned that there was still
  interest in TTS on the XO.  What I was wondering is if there was any
  progress made by Hemant Goyal or anyone else in getting the
  Speech-Dispatcher software included with the Sugar distribution, if the
  newer version of Python that resolved the power management issue was
  included, etc.  I've sent a couple of emails to Hemant and haven't 
 heard
  back from him.  I was wondering if he was still working on these 
 things,
  or if someone else had taken over his work, etc.  He was making RPMs 
 for
  Fedora for installing speech-dispatcher.
 
  James Simmons



___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: etextRead activity and espeak

2009-02-12 Thread James Simmons
Tony,

Read Etexts does *not* have speech disabled.  If you install 
speech-dispatcher and configure it to use espeak (NOT espeak-generic) 
then it will work.  What happens in my code is I try to import 
speech-dispatcher python and if I don't find it then I hide the Speech 
tab on the toolbar.  Hemant Goyal was working on creating RPMs for 
speech-dispatcher for Fedora a few months ago, and it may be possible to 
do a yum install to get it.  It will drag in a bunch of other stuff you 
don't need, though, based on my experiences with the RPMs he gave me to 
try out.

The reason the Activity needs speech-dispatcher rather than just espeak 
alone is that the Python code needs to be called back on word breaks.  
That's the only way to do karaoke highlighting, and espeak by itself 
won't do it.  I would also warn you that the highlighting is not 
perfect.  Sometimes it skips a word.  The way I wrote the code keeps it 
from falling behind and highlighting the wrong word, but it will skip 
one every so often, at least a couple per page.  The folks on the 
speech-dispatcher mailing list seemed to think that festival might work 
better than espeak as far as these callbacks were concerned.

The other thing to warn you about is that multithreaded Python apps 
prevent the power management code from kicking in, or at least this 
happened with the version of Python that the XO was using when I wrote 
the Activity.  This may be resolved now; I can't say.  There was some 
talk here that a newer version of Python would resolve the issue.

I stopped working on these Activities in late September of last year 
when my basement experienced some flooding.  It was January before the 
mold remediation was done and I was able to go back down there to 
program.  Also, I wiped out both Linux installs I was using with espeak 
and replaced them with Fedora 10, so I don't currently have 
speech-dispatcher installed and configured, and it will take me awhile 
to remember what I did.  I was really counting on Hemant to get SD ready 
for the XO, but he isn't responding to my emails these days.

So, in summary, this may turn out to be more of a do-it-yourself project 
than you had hoped for.  I would dearly love to have Read Etexts used by 
kids in Nepal, so be assured that I will do everything I can to help.  
If you want to experiment with what I created the best way would be to 
get an old computer that runs sugar-jhbuild or use Fedora 10 with the 
Sugar packages and install speech-dispatcher.  Get that working before 
you try using an actual XO.

I've been thinking about Read Etexts ever since Kindle 2 was announced 
and I heard it has text to speech built in.  I have always thought that 
really good support for ebooks would make the XO a Kindle-killer.  It 
would cost less, be readable in sunlight, give you access to thousands 
of free books, and when you get one a kid in a foreign land gets one 
too.  What's not to like?

Sorry I can't be more encouraging,

James Simmons


Tony Anderson wrote:
 Hi,

 The educational team at OLENepal would like a 'karaoke-style' text 
 reader above all other activities on the XO. This is primarily for 
 English. Looking at the activity code, it looks like the speech code 
 is there but disabled.

 Would it be possible to release a version that supports espeak without 
 the Speech-Dispatcher pending its implementation in Sugar? This would 
 give us a chance to experiment with creating 'read-aloud' stories.

 Tony



  Thanks for your response.  I never questioned that there was still
  interest in TTS on the XO.  What I was wondering is if there was any
  progress made by Hemant Goyal or anyone else in getting the
  Speech-Dispatcher software included with the Sugar distribution, if the
  newer version of Python that resolved the power management issue was
  included, etc.  I've sent a couple of emails to Hemant and haven't 
 heard
  back from him.  I was wondering if he was still working on these 
 things,
  or if someone else had taken over his work, etc.  He was making RPMs 
 for
  Fedora for installing speech-dispatcher.
 
  James Simmons



___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel