Point at which speaking is stopped?

Mike Bonner bonnmike at gmail.com
Mon Dec 26 14:21:13 CST 2011


The example isn't great, there are some issues with it but its close at
least.

On Mon, Dec 26, 2011 at 1:09 PM, Mike Bonner <bonnmike at gmail.com> wrote:

> Yep, in simplest form its not to bad.  I put a bunch of text into a field
> then to read it, set the itemdelimter to "."  put the field text into a
> variable and replaced "? " with ?. " same with "! " replaced with "!. " (to
> ensure we still retain punctuation tone changes)
>
> So the following script placed in a button will read from field 1.
> Clicking the button again pauses, Reading picks up where it left off.
>
> local tReading, tCurrLine, tTotalLines,tText
> on mouseUp
>    if tReading is empty then put false into tReading
>    put not tReading into tReading
>    set the label of me to "Reading: " & tReading
>    startLooping
> end mouseUp
>
> command startLooping
>    set the linedelimiter to "."
>    if tReading then
>       if tCurrLine is empty then
>          put field 1 into tText
>          replace "? " with "?. " in tText
>          replace "! " with "!. " in tText
>          put the number of lines in tText into tTotalLines
>          put 1 into tCurrLine
>       end if
>
>       if not revIsSpeaking() then
>          revspeak line tCurrLine of tText
>          if tCurrLine = tTotalLines then
>             put false into tReading
>             put empty into tCurrLine
>          else
>             add 1 to tCurrLine
>          end if
>       end if
>       set the label of me to "Reading: " & tReading
>       send startLooping to me in 20 milliseconds
>    end if
> end startLooping
>
> On Mon, Dec 26, 2011 at 12:51 PM, Mike Bonner <bonnmike at gmail.com> wrote:
>
>> Yeah, word by word its horrible. Sentence by sentence is cool, or even
>> check for several things. Read from sentence start to either period, comma,
>> exclamation, question mark, or end of line. (though if revspeak is smart
>> enough to know that comma indicates a pause then ignore commas.)
>>
>>
>> On Mon, Dec 26, 2011 at 12:27 PM, Roger Eller <
>> roger.e.eller at sealedair.com> wrote:
>>
>>> On Mon, Dec 26, 2011 at 2:11 PM, Mike Bonner wrote:
>>>
>>> > The only way I can think of is to speak individual words rather than a
>>> > block of text. This way you can cycle through words, each with its own
>>> > "revspeak" and can monitor where in the text you are at every moment.
>>>
>>>
>>> That's a good idea, but it may cause the speech to sound 'even' less
>>> natural.  Maybe speak a sentence at a time, then if the user pauses,
>>> resume
>>> speaking at the beginning of the last sentence.
>>>
>>> 漏oger
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>>
>


More information about the use-livecode mailing list