Can one pause revSpeak?

Jim Hurley jhurley at infostations.com
Thu Sep 29 11:27:10 EDT 2005


>
>Message: 3
>Date: Wed, 28 Sep 2005 12:22:43 -0700
>From: Phil Davis <davis.phil at comcast.net>
>Subject: Re: Can one pause revSpeak?
>To: How to use Revolution <use-revolution at lists.runrev.com>
>Message-ID: <433AED83.6020003 at comcast.net>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>You could roll your own:
>
>- at speech start, store the seconds in "tStartSecs"
>
>- at speech "pause", calc the [approximate] number of the
>    last word spoken:
>      put (revSpeechSpeed / 60) * (the seconds - tStartSecs) \
>          into tPauseWord
>
>- at speech "resume", start at the resume point:
>      revSpeak (word tPauseWord to -1 of tMyWordContainer)
>
>Actual implementation will be a little more complicated than this,
>because you will have to accumulate the speech duration times as you go,
>and subtract that from tStartSecs each time you resume.
>
>FWIW -
>Phil Davis


Phil,

Thanks for the suggestion. I was unaware of RR's revSpeechSpeed property.

Unfortunately it is not very reliable. At a speed set at 150, rev 
might speak anywhere from 128 to 154.

As an alternative I have put  this handler into the field:

on mouseUp
   put the clickchunk into tChunk
   set the tClickChunkStart of field 1  to word 2 of tChunk
   revstopSpeech
end mouseUp


And stop speech by ckicking on the point where I wish the next speech 
to begin on resuming.

And then resume speech from char  tClickChunkStart  to char -1 of field 1.

Not exactly what I wanted, but  it will do.

Thanks again,

Jim


More information about the use-livecode mailing list