[jawsscripts] Re: Saying two messages with a specific period of silence in between

  • From: "Kamil" <kamilimak@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Sun, 13 Jul 2008 09:34:45 -0400

Thanks Martin for your quick response,

Unfortunately, as I mentioned before, JAWS doesn't wait for the message to 
be spoken, and then executes next statement.
In your code, try changing the first message to something like,
    "The Script Manager is a JAWS script editing program with all the 
features necessary for you to create scripts."
Then you will see that the second message will be spoken right after the 
first one completes,
without any silence in between.

Cheers,

Camille

----- Original Message ----- 
From: "Martin Slack" <m.g.slack@xxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Sunday, July 13, 2008 3:59 AM
Subject: [jawsscripts] Re: Saying two messages with a specific period of 
silence in between


> Hi Kamil,
>
>  You can include the speaking of a short silence within a while loop to
> produce any length of silence, as in the code below.  I've included some
> code to measure the total duration of the silence.  I've also included a
> pause command within the loop, which means that as you vary the initial
> value of the count variable, the duration of the loop changes in 
> increments
> of about 140 milliseconds.  I imagine that if you removed that command, 
> you
> would have to have a much bigger initial value of count, but would end up
> with much finer control of the loop duration.
>
>  hth, Martin
>
> Script test ()
> var int count, int start, int end
>
> let count = 16
> SayString ("hello ")
> let start = GetTickCount ()
>
> While (count > 0) && (not IsKeyWaiting ())
>  SayString (" ")
>  Pause ()
>  let count = count - 1
> EndWhile
>
> let end = GetTickCount ()
> SayString ("world")
>
> MessageBox ("silence was " + IntToString (end - start) + " milliseconds
> long")
> EndScript
>
>
> ----- Original Message ----- 
> From: "Kamil" <kamilimak@xxxxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Sunday, July 13, 2008 3:11 AM
> Subject: [jawsscripts] Saying two messages with a specific period of 
> silence
> in between
>
>
>> Hi folks,
>>
>> I would like JAWS to say two messages with exactly two-second silence in
>> between.
>> Neither Delay (20), nor twenty Pause () commands works,
>> since both starts right after the first message is sent to the TTS, not
>> when
>> it's completely spoken.
>> I tried counting number of words in the first message,
>> and calculating the time needed for it to be completely spoken using the
>> current speech rate.
>> The result varies based on the total number of sylabels in the message.
>>
>> Can you think of a better solution?
>> As far as I know, there is no function such as TtsIsDoneEvent or
>> IsTtsBusy.
>>
>> Thanks,
>>
>> Camille
>>
>> __________
>> 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: