[jawsscripts] Re: Schedule events

  • From: "Jim Snowbarger" <Snowman@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Sun, 24 Feb 2013 19:47:33 -0600

No, in fact, this is what has been discussed before on this list.  WE don't 
have a convenient way to determine when the synthesizer has finished 
speaking.
The signal is certainly there, somewhere, but we don't seem to have a good 
way at getting to it.
The method I have used in the past to try to get around this involved 
analyzing the message to be spoken, and calculating a delay time based on 
that message.
Somewhere, I have a piece of code that follows the pronunciation rules of 
the English language, and analyzes a piece of text to generate a syllable 
count.  I wrote that for a different purpose, but found it useful here.  I 
then used the syllable count, in conjunction with speech rate,  to create a 
delay interval time.
The more syllables, the longer the delay.
That technique works, sort of, but you would have to write a different 
analyzer for each language, and all of that.
Maybe somebody here will notice some clever hook in a sapi5 dll or something 
that will let us query the synthesizer to see if it has finished.


----- Original Message ----- 
From: "Nguyen Van Dung" <dungnv1984@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Sunday, February 24, 2013 4:11 AM
Subject: [jawsscripts] Re: Schedule events


Hi
I have a same problem related to delay  event. Could you please take a look
it at and give me any idea?
My context is: I need to say 2 message and have a delay between them, so I
created a snip of code as below:
-------
Say(message1, OT_STRING)
DELAY(10)
Say(message1, OT_STRING)
-----
It seems to delay function starts counting time after message1 is started
spoken, not after message 1 is spoken completely. So if the message 1 is
long, then delay function does not take any effective.
I need  a delay period between finishing saying message 1 and starting
saying message 2.
Do you have any idea for my case?
Thank so much.
Regards,
Dung Nguyen.

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Jim Snowbarger
Sent: Sunday, February 24, 2013 11:22 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Schedule events

Trivia Question, in the folowing snippet of code, which message do you think
will get spoken first?  Hello?  or Goodbye.
The winner will recieve an all expenses paid trip to nowhere, and a cracked
version of NVDA.
Script Test ()

; start this from the keyboard

ScheduleFunction ("HelpTest", 1)

delay(50)

SayString ("goodbye")

EndScript



Function helpTest ()

SayString ("hello")

EndFunction



The answer?  Are you sure you want to know? You're not going to like this.



Wrong.  Good bye is spoken first, because the jaws script engine is busy
processing the delay statement when the scheduled function comes due.  So,
the scheduled event must wait for the main script to finish, even though it
is due sooner.





__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts



__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: