Can one pause revSpeak?
Sarah Reichelt
sarah.reichelt at gmail.com
Thu Sep 29 17:08:32 EDT 2005
> >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.
>
How about setting up a loop that reads a sentence then waits until
revIsSpeaking goes to false. After that, check for a key or mouseDown
or checkbox set and either go on to the next sentence or stop, while
remembering which sentence was next. Then a "Resume" button or
keystroke could start the loop again.
Cheers,
Sarah
More information about the use-livecode
mailing list