tts_rate

Indicates how fast the text should be spoken. Wavelink recommends using the calibration tool to adjust this setting, rather than setting it through a script or the screen reformatter.

Possible Values

Any number from 50-400, with 100 being the default (and "normal" talking speed), 50 being 1/2 normal speed, and 400 being 4 times faster than normal speed.

Example #1

This script is designed to be triggered by a speech-to-text global action to increase the speech rate. The term "faster" could be added to a grammar file to act as a command that calls the following script.

Script( IncreaseSpeechRate )
String( sRate )
String( sMessage )
Number( nRate )

Comment: Increase Speech rate by 10 increments
nRate = Speech_Get_Setting( "tts_rate" )
If( Number_Equal( nRate, 400 ) )
Speech_From_Text( "Speech Rate already at maximum.", TRUE )
Message( "Speech Rate already at maximum.", 5 )
Else
nRate = Number_Plus( nRate, 10 )
Speech_Change_Setting( "tts_rate", nRate )
sRate = Number_To_String_Decimal( nRate )
sMessage = "New Speech Rate is: "
sMessage = String_Combine( sMessage, sRate )
Message( sMessage, 5 )
End_If
Return

Example #2

This script is designed to be triggered by a speech-to-text global action to decrease the speech rate. The term "slower" could be added to a grammar file to act as a command that calls the following script.

Script( DecreaseSpeechRate )
String( sRate )
String( sMessage )
Number( nRate )

Comment: Decrease Speech rate by 10 increments
nRate = Speech_Get_Setting( "tts_rate" )
If( Number_Equal( nRate, 50 ) )
Speech_From_Text( "Speech Rate already at minimum.", TRUE )
Message( "Speech Rate already at minimum.", 5 )
Else
nRate = Number_Minus( nRate, 10 )
Speech_Change_Setting( "tts_rate", nRate )
sRate = Number_To_String_Decimal( nRate )
sMessage = "New Speech Rate is: "
sMessage = String_Combine( sMessage, sRate )
Message( sMessage, 5 )
End_If
Return

Example #3

Script(Speech_Rates)
Number(nRate)
Activate(From_Menu)
nRate = Speech_Get_Setting("tts_rate")
Message(String_Combine("Initial speech rate is ",
Number_To_String_Decimal(nRate)), 5)
Speech_From_Text("This is the current speed.", TRUE)
Speech_Change_Setting("tts_rate", 10)
Speech_From_Text("This is the slow text.", TRUE)
Speech_Change_Setting("tts_rate", 99)
Speech_From_Text("This is the fast text.", TRUE)
Speech_Change_Setting("tts_rate_", nRate)
Return

See Also

Speech_Get_Setting, Speech_Get_Setting_Value_Desc, Speech_Get_Setting_Max, Speech_Find_Setting_Value, Speech_To_Text, Speech_From_Text, Speech_Setting_Available, Speech_Change_Setting

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal