[jawsscripts] silence in between Saying two messages
- From: "Sina Sotudehnia" <sina3c@xxxxxxxxx>
- To: <jawsscripts@xxxxxxxxxxxxx>
- Date: Fri, 18 Jul 2008 13:16:30 -0400
Hi friends,
I think the following can be a solution for
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.
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 = 3
let FirstString="The Script Manager is a JAWS script editing program with
all the features necessary for you to create scripts"
let secondString="So, continue Talking."
let CurrentRate=GetSettingInformation (V_RATE,VCTX_GLOBAL , MinRate,
MaxRate)
let StrLen=StringLength (FirstString)
let count = (StrLen / CurrentRate +1) * 28 + SilenceSecond * 6
StopSpeech ()
saystring(FirstString)
While (count > 0) && (not IsKeyWaiting ())
Pause ()
let count = 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
http://www.freelists.org/list/jawsscripts
- Follow-Ups:
- [jawsscripts] Re: silence in between Saying two messages
- From: Smith, Alice A. HQ DCO
Other related posts:
- » [jawsscripts] silence in between Saying two messages
- » [jawsscripts] Re: silence in between Saying two messages
- » [jawsscripts] Re: silence in between Saying two messages
- » [jawsscripts] Re: silence in between Saying two messages
- » [jawsscripts] Re: silence in between Saying two messages
- [jawsscripts] Re: silence in between Saying two messages
- From: Smith, Alice A. HQ DCO