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

Update .listen_in_background to handle microphone disconnects #648

Closed
wants to merge 0 commits into from

Conversation

TomKranenburg
Copy link

@TomKranenburg TomKranenburg commented Jan 9, 2023

Moving the opening of the audio source inside the thread loop. In a case where the audio source times out it will reconnect. This was causing problems on my own system when the mic is muted. The audio source would disconnect and not automatically reconnect.

@TomKranenburg
Copy link
Author

Just to clarify, this only happens on some of my Windows 10 systems. I'm really not sure why this is. You might have a bit of trouble reproducing this one.

@TomKranenburg TomKranenburg changed the title Update __init__.py Update .listen_in_background to handle microphone disconnects Jan 10, 2023
Copy link
Collaborator

@ftnext ftnext left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this pull request.

This appears to address two issues at once.
This in turn makes merging more difficult, so it would be very helpful to me if this pull request could be split into two small pull requests.

Commit 2537ba1 is duplicated on #651 , so I think this pull request would be easier to merge if reverted

speech_recognition/__init__.py Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

2 participants