[Sugar-devel] Assistance needed to debug Sugar Activities book examples for TTS

Aleksey Lim alsroot at member.fsf.org
Sat Jan 16 22:43:48 EST 2010


On Sat, Jan 16, 2010 at 06:42:08PM -0600, Jim Simmons wrote:
> Aleksey,
> 
> I'm writing a beginner's book on creating Sugar Activities over at
> Floss Manuals.  The URL is:
> 
> http://en.flossmanuals.net/bin/view/ActivitiesGuideSugar/WebHome
> 
> I'm doing a chapter on adding Text To Speech to your Activity.  I'm
> using simplified versions of Read Etexts as sample code for the
> chapters because I want something more interesting than the "Hello
> World" examples that beginners generally get, but not too complicated.
> 
> When I originally wrote TTS into Read Etexts using speech-dispatcher I
> mostly understood how it worked.  When you updated it to use either
> gst-espeak-plugin or speech-dispatcher most of my code didn't change
> much so I didn't spend much time figuring out what you did.  Now I
> need to create a simpler version of the same code to show to others.
> My attempt to do that is in Gitorious here:
> 
> http://git.sugarlabs.org/projects/myo-sugar-activities-examples
> 
> The code in question is in two files: ReadEtextsTTS.py and speech.py.
> The first one is a standalone Python version of Read Etexts with no
> toolbar.  You start and stop speech using the "End" key on the keypad.
>  The second one is adapted from the code you wrote for Read Etexts,
> with the speech-dispatcher stuff removed.  I've looked at the code a
> lot and it seems to me that it should be as close to the original as I
> can make it.  However, pause and resume don't work.  When I start
> speech it does the speaking and highlighting just fine, but when I
> press the "End" key to pause it stops speaking, but the next press of
> the "End" key makes it resume from the start of the page again,
> instead of resuming from where it left off.  I can't see why it's
> doing that so I'm hoping to get more eyeballs checking it, especially
> yours.

I've added simple TTS application to
http://wiki.sugarlabs.org/go/Activity_Team/gst-plugins-espeak#Simple_TTS_example

In fact in case of stoping/playing, gst-espeak adds nothing, its just a
gst regular stuff, you need to set proper pipe's status(see example)

> I tried the examples on your page on gst-espeak-plugin:
> 
> http://wiki.sugarlabs.org/go/Activity_Team/gst-plugins-espeak
> 
> I like them a lot and would like to include them, or versions of them,
> in the book, giving you full credit of course.  I would only do that
> with your permission.

of course you can and even w/o any credits (it has positive points,
since I'm not sure about quality of code;)

> They would not be a substitute for my own
> examples since they don't demonstrate pausing and resuming, but they
> do demonstrate things I didn't know espeak could do.
> 
> When I have this chapter finished I'd like your feedback as well.

will do!

> 
> Thanks,
> 
> James Simmons
> 

-- 
Aleksey


More information about the Sugar-devel mailing list