Azure-Samples / Cognitive-Speech-STT-Windows

Windows SDK for the Microsoft Speech-to-Text API, part of Cognitive Services
https://www.microsoft.com/cognitive-services/en-us/speech-api
Other
112 stars 89 forks source link

Problem calling Dispose #20

Closed IlGalvo closed 7 years ago

IlGalvo commented 7 years ago

I'm facing a problem when i try to call the form Close() method inside the Eeventhandler OnResponseReceived: when the form closing rises... private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { if (micClient != null) { micClient.Dispose(); //stucks for several seconds }

        base.OnClosing(e);

} the MicrophoneRecognitionClient.Dispose() stucks for serveral seconds. It may take also 10 to 15 seconds. Hope someone can help me.

v-sukssi commented 7 years ago

Is it possible for you to upload the complete sample code.

priyaravi20 commented 7 years ago

Please use the sample on Github - https://github.com/Azure-Samples/Cognitive-Speech-STT-Windows/tree/master/samples/SpeechRecognitionServiceExample

Priya Rajan Microsoft