Converts text into sound and plays the resulting sound on the computer. If the parameter Wait Until Done is FALSE, the script will continue to execute while the sound is being played.
For Temporary Settings, each setting must start with "tts_" and use the format setting=value. Multiple settings may be specified, and should be separated by comma (,) characters. Quotes around the value are optional. If a value is not a number, then the Text-to-Speech engine uses the value closest to the value text description provided. Temporary Settings are only in effect only while the speech is being played.
Parameters
Text |
The text that is converted into sound. |
Wait Until Done |
Indicates whether the script resumes execution before the speech has completely played. |
Temporary Settings |
An optional string to set one or more speech settings only for the duration of this Text-to-Speech action. |
Format
Speech_From_Text ("Text", Wait Until Done)
or
Speech_From_Text ("Text", Wait Until Done, "Optional Temporary Settings")
Return Value
Returns a Boolean. TRUE if the sound was played successfully, FALSE if otherwise.
Example
Script( Speech_From_Text_Test )
Activate( From_Menu )
Speech_From_Text( "Hello again.", FALSE )
Speech_From_Text( "A508421", FALSE, "tts_readmode=character,
tts_rate=200" )
Speech_From_Text( "Goodbye", FALSE )
Return
See Also
Speech_From_Text_Available, Speech_To_Text_Available, Speech_To_Text, Speech_To_Text_No_Wait, Speech_To_Text_Cancel, Speech_Setting_Available, Speech_Change_Setting, Speech_Get_Setting, Speech_Get_Setting_Max, Speech_Find_Setting_Value, Speech_Get_Setting_Value_Desc, Speech_To_Text_Get_User_Name, Speech_To_Text_Change_User_Name, Speech_From_Text_Error_Desc, Speech_To_Text_Error_Desc, Speech_From_Text_Cancel, Speech_Get_Confidence_Level
Was this article useful?
The topic was:
Inaccurate
Incomplete
Not what I expected
Other