Compartilhar via


Note

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

SpeechRecognitionEngine.Dispose Method

Disposes the SpeechRecognitionEngine object.

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

Syntax

'Declaration
Public Sub Dispose
'Usage
Dim instance As SpeechRecognitionEngine

instance.Dispose()
public void Dispose()

Implements

IDisposable.Dispose()

Remarks

The Dispose() method will block execution of disposing the SpeechRecognitionEngine object until either all pending event handlers have returned or until 30 seconds have elapsed, whichever occurs first. Be aware that if you call Dispose() in an event handler, that this will create a circular wait for the full 30 seconds, during which execution of the method will be blocked. Typically, calling Dispose() in an event handler is not advised.

See Also

Reference

SpeechRecognitionEngine Class

SpeechRecognitionEngine Members

Dispose Overload

Microsoft.Speech.Recognition Namespace