Speech_To_Text

Listens to the user speak and returns the text equivalent of what he/she said in the string variable. If a grammar is specified, the grammar file with that name is used for speech recognition; otherwise, the previous grammar file is reused.

Parameters

Text

The string variable into which the converted speech is placed.

Grammar

The grammar file to use.

Return Value

Returns a string, the text equivalent of a user’s speech. Returns an empty string if no acceptable speech was detected. An empty string result may indicate a timeout condition or an error condition.

Example

Script( Speech_To_Text_Test )
String( szResult )
Activate( From_Menu )
If_Not( Speech_To_Text_Available )
Ask_OK( "Speech to text is not available.", "Error" )
Return
End_If
Message( "Say one or more digits", 0 )
If_Not( Speech_To_Text( szResult, "connected_digits" ) )
Message_Clear
Ask_OK( "No results returned from the speech.", "Error" )
Return
End_If
Message_Clear
Ask_OK( szResult, "Speech-to-text-results" )
Return

See Also

Speech_From_Text_Available, Speech_From_Text, Speech_To_Text_Available, 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

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal