I want to stop a continuous async recognition immediately
See original GitHub issueI have a scenario where I am using StartContinuousRecognitionAsync
to start a recognition. Some time later I want to stop the recognition, but in this scenario I am not interested in final results and do not want to block my thread for the ~10 secs it is typically taking for StopContinuousRecognitionAsync().get();
to complete (for some reason almost always I have to wait for a timeout on the server side).
How can I stop the recognizer instantly?
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Azure cognitive stops immediately after I start
StopContinuousRecognitionAsync method). You can achieve this by calling TaskCompletionSource.TrySetResult from the SpeechRecognizer.
Read more >How to recognize speech - Azure
To stop recognition, you must call StopContinuousRecognitionAsync . Here's an example of how continuous recognition is performed on an audio ...
Read more >What is the idiomatic way to running two async methods in ...
What you want to do is grab the first element from the TaskGroup , and then cancel the other pending tasks (in this...
Read more >Getting Started With Async Features in Python
This step-by-step tutorial gives you the tools you need to start making asynchronous programming techniques a part of your repertoire.
Read more >Stop using async void in C#! Do this instead. - YouTube
Use code REST15 for 15% off the new From Zero to Hero - REST APIs in .NET course: https://bit.ly/restchapsas Become a Patreon and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@adammpolak We always send a final result (“Recognized” event) based on whatever audio received by the time StopContinuousRecognitionAsync was called. So if you’re in the middle of saying “this is a test” you may get “This is.” as a final recognition result (“recognized” event) if you called Stop in the middle of the sentence.
The Recognized event will give you recognition results since the previous Recognized event (not since your started continuous recognition). In continuous recognition, you will get multiple Recognized events, after each pause in the audio (after each sentence).
Did you ever get a response to this?