Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

SpeechRecognitionEngine.SimulateRecognize Method

Simulates recognition of the specified string.

Namespace:  Microsoft.Speech.Recognition
Assembly:  Microsoft.Speech (in Microsoft.Speech.dll)

Syntax

'Declaration
Public Function SimulateRecognize ( _
    inputText As String _
) As RecognitionResult
'Usage
Dim instance As SpeechRecognitionEngine
Dim inputText As String
Dim returnValue As RecognitionResult

returnValue = instance.SimulateRecognize(inputText)
public RecognitionResult SimulateRecognize(
    string inputText
)

Parameters

  • inputText
    Type: System.String
    The string for which to simulate recognition.

Return Value

Type: Microsoft.Speech.Recognition.RecognitionResult
Returns RecognitionResult.

Exceptions

Exception Condition
ArgumentNullException

Thrown if inputText is a null reference (Nothing in Visual Basic) or an empty string.

Remarks

The SimulateRecognize(String) method creates an ‘idealized’ audio representation of the input phrase (based on the engine's lexicon and acoustic model), and then performs recognition on the idealized audio. Simulation can help you to determine whether (or how well) the speech recognition engine recognizes the pronunciation of a word. This is in contrast to the EmulateRecognize() and EmulateRecognizeAsync() methods, which use text instead of audio for recognition.

See Also

Reference

SpeechRecognitionEngine Class

SpeechRecognitionEngine Members

Microsoft.Speech.Recognition Namespace