question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I want to stop a continuous async recognition immediately

See original GitHub issue

I 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:closed
  • Created 2 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dargilcocommented, Feb 4, 2022

@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).

0reactions
aprotopapascommented, May 17, 2023

Sorry for asking on a closed issue, but I thought this is most likely the best place to get the attention of the right people: what is the situation with the Python client library? In our tests it seems to be affected by the 10-second freeze, no matter what we try. The release notes pointed at by @dargilco do not include python, and the issue is also not mentioned in the 1.21 release notes. Thanks in advance for any feedback!

Did you ever get a response to this?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found