Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
SpeechRecognitionEngine.Dispose Method (Boolean)
Disposes the SpeechRecognitionEngine object and releases resources used during the session.
Namespace: Microsoft.Speech.Recognition
Assembly: Microsoft.Speech (in Microsoft.Speech.dll)
Syntax
'Declaration
Protected Overridable Sub Dispose ( _
disposing As Boolean _
)
'Usage
Dim disposing As Boolean
Me.Dispose(disposing)
protected virtual void Dispose(
bool disposing
)
Parameters
- disposing
Type: System.Boolean
Remarks
The Dispose(Boolean) 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(Boolean) 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(Boolean) in an event handler is not advised.