Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Feature/restart mic #2368

Merged
merged 3 commits into from
Oct 20, 2019
Merged

Feature/restart mic #2368

merged 3 commits into from
Oct 20, 2019

Conversation

forslund
Copy link
Collaborator

Description

  • Restarts the mic in case of an error accessing the input stream.
  • Ignores the overflow as indicated by the previous comment
  • A simple restart attempt counter is used to limit the number of retries. Currently set to 20. Counter is reset on successful wakeword fetch. (Not optimal, but works for the most common situations)

How to test

Stop the stream and trigger the read, cherry-pick the head of test/mic-restart onto the branch and send the kaboooom message to trigger the exception.

Contributor license agreement signed?

CLA [ Yes ]

@devs-mycroft devs-mycroft added the CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors) label Oct 20, 2019
Copy link
Contributor

@davidwagnerkc davidwagnerkc left a comment

Choose a reason for hiding this comment

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

Works well. Mic recovers in ~1 second 🎉. 🚢 it

@forslund forslund merged commit 2c1367f into dev Oct 20, 2019
@forslund forslund deleted the feature/restart-mic branch October 25, 2019 07:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants