Gets the confidence value for the last Speech_To_Text action.
Return Value
Returns a number that is the confidence value for the last successful Speech_To_Text result.
The number is zero if the confidence value is not available.
Example
Script( Speech_Get_Confidence_Level_Test )
String( szResult )
String( szMessage )
Number( nConfidence )
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
nConfidence = Speech_Get_Confidence_Level
szMessage = String_Combine( szResult, ", confidence: " )
szMessage = String_Combine( szMessage, Number_To_String_Decimal( nConfidence ) )
Ask_OK( szMessage, "Speech-to-text-confidence" )
Return
See Also
Speech_From_Text, Speech_From_Text_Cancel
Was this article useful?
The topic was:
Inaccurate
Incomplete
Not what I expected
Other