Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to stop listen_in_background #47

Closed
marchtom opened this issue Jul 12, 2015 · 3 comments
Closed

how to stop listen_in_background #47

marchtom opened this issue Jul 12, 2015 · 3 comments

Comments

@marchtom
Copy link

Once I start listen_in_background I can't stop it. Is there any way to turn it off?

Thank you,
marchtom

@Uberi
Copy link
Owner

Uberi commented Jul 12, 2015

Hi @marchtom,

This feature has been added in version 2.0, which I just release. Please update your library and check out the "Listening to a microphone in the background" example in the README!

Basically, now when you call listen_in_background, it will return a function. Call that function to stop the listener thread.

@Uberi Uberi closed this as completed Jul 12, 2015
@marchtom
Copy link
Author

@Uberi thank you for fast response.

Unfortunately after update I get this error as soon as I start listen_in_background

Exception in thread Thread-3:
Traceback (most recent call last):
File "E:\Users\Tomek\Anaconda32\lib\threading.py", line 810, in *bootstrap_inner
self.run()
File "E:\Users\Tomek\Anaconda32\lib\threading.py", line 763, in run
self.__target(_self.__args, _self.__kwargs)
File "E:\Users\Tomek\Anaconda32\lib\site-packages\speech_recognition__init
.py", line 373, in threaded_listen
except TimeoutError:
NameError: global name 'TimeoutError' is not defined

@Uberi
Copy link
Owner

Uberi commented Jul 12, 2015

This has been fixed in version 2.0.1 - we should really test on Python 2 more often!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants