[jawsscripts] Re: silence in between Saying two messages

  • From: "David Farough" <David.Farough@xxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Fri, 18 Jul 2008 14:43:02 -0400

I found that when I tested this using eloquence and the SAPI5 scansoft
synthe, that the silence was much longer using SAPI5 synthesizers.
 
My eloquence time worked out to be slightly more than 2 seconds and the
Scansoft silences were closer to 20 seconds 
 
My eloquence speech rate is set to   90 and my scansoft rate is 13
which is approximately 65%.
 
David Farough
Application Accessibility Coordinator/coordonateur de l'accessibilité 
Information Technology Services Directorate /
Direction des services d'information technologiques
Public Service Commission / Commission de la fonction publique
Email / Courriel:  David.Farough@xxxxxxxxxxxxx 
Tel. / Tél:    (613) 992-2779 
>>> "Smith, Alice A.   HQ DCO" <Alice.A.Smith@xxxxxxx> 02:19 PM Friday,
July 18, 2008 >>>
Sina,

I wrote similar code using Delay. It works but I didn't time it with a
stopwatch.
How did you arrive at  the factors of 28 for Rate and 6 for Silence?
How accurate is it?

Alice


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Sina Sotudehnia
Sent: Friday, July 18, 2008 1:17 PM
To: jawsscripts@xxxxxxxxxxxxx 
Subject: [jawsscripts] silence in between Saying two messages=20

Hi friends,
I think the following can be a solution for=20

Saying two messages with a specific period of silence in between

I sent it for test and I was waiting to get feedback on test result
from
any one who is interesting.  But I did not get any answer yet.=20

I want to know does this one work on same way with different computer
speed and TTS as it works on my computer?

In this program, (That is my first time Scripting in jaws), I am using
Pause

function to provide two type of delay.

One delay to provide enough time that is required to speech the first

string, and second delay for requested silence time after reading the
first

string.

because the speed rate of voice is assigned by user, I get this value
by

using the following function that return the current voice speech
rate:

GetSettingInformation (V_RATE,VCTX_GLOBAL , MinRate, MaxRate)

The first and second parameters are two Constant which are coming from

hjconst.jsh" header file. (notice to, the "Include" statement before
start

of script). and the third and forth parameters ar two variable which
get
the

minimum and maximum of the speed rate of Voice Context or any things
that

is requested by the two first parameters.

after that I am finding the length of the first string. Then in a
formula

all this values are combining together with silence time and two other

constant numbers.

The number 28 is for balancing the Rate and the number 6 is for
balancing

the requested silence time.

All of them make the total number of the time that we are using the
Pause

function.

As I said, the calculation is not very accurate but it works for the

different string length. As you all know, it is easier to convert this

script to a function. In this case the function has to include two

parameters, FirstString and SilenceTime. and the return value, can be
an

integer to show if the function end by itself or someone hit a key to
end it

manually.

the function "StopSpeech ()", is good for make any speech off before,
and

after the using saystring command..

Please let me know if it works for you. I Will be happy to get any

feedback.

----------









include "hjconst.jsh"





Script TestScripting ()

var int count

var int CurrentRate, int MinRate, int MaxRate, int StrLen, int
SilenceSecond

var string FirstString, String secondString

let SilenceSecond =3D 3

let FirstString=3D"The Script Manager is a JAWS script editing program
with

all the features necessary for you to create scripts"

let secondString=3D"So, continue Talking."

let CurrentRate=3DGetSettingInformation (V_RATE,VCTX_GLOBAL , MinRate,

MaxRate)

let StrLen=3DStringLength (FirstString)

let count =3D (StrLen / CurrentRate +1) * 28 + SilenceSecond * 6

StopSpeech ()

saystring(FirstString)

While (count > 0) && (not IsKeyWaiting ())

Pause ()

let count =3D count - 1

EndWhile

StopSpeech ()

SayString (secondString)

EndScript

Regards,

Sina Sotudehnia

Independent Insurance Advisors Group

Email: sina@xxxxxxxxxxx Web: www.IIAGROUP.CA 

Direct Tel: (416) 496-9300

__________
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 


100 Years Merits a Celebration!  
http://www.psc-cfp.gc.ca/100/index-eng.htm 
100 ans, ça mérite une célébration!    
http://www.psc-cfp.gc.ca/100/index-fra.htm 


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

Other related posts: