8000 remove hardcoded timeouts - now in mycroft.conf by krisgesling · Pull Request #2668 · MycroftAI/mycroft-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Sep 8, 2024. It is now read-only.

remove hardcoded timeouts - now in mycroft.conf #2668

Merged
merged 1 commit into from
Aug 21, 2020

Conversation

krisgesling
Copy link
Contributor

Description

Removes hardcoded recording timeout values that were moved to the default mycroft.conf.

They were left for backwards compatibility. Removing in preparation for 20.08

How to test

  • with default config say something short (like "time") and listener should timeout 3 seconds after your speech.
  • with default config talk non-stop and listener should timeout after 10 seconds.
  • set listener.recording_timeout parameter to 2.0 and ensure no utterance can exceed 2 seconds.
  • set listener.recording_timeout_with_silence parameter to 10.0 and listener will record a full 10 seconds of silence.

Contributor license agreement signed?

@devs-mycroft devs-mycroft added the CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors) label Aug 18, 2020
@@ -374,14 +364,12 @@ def __init__(self, wake_word_recognizer, watchdog=None):

# The maximum seconds a phrase can be recorded,
# provided there is noise the entire time
self.recording_timeout = listener_config.get('recording_timeout',
self.RECORDING_TIMEOUT)
self.recording_timeout = listener_config.get('recording_timeout')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe use brackets here to generate a lookup error if it's missing from config. This will default to None and cause issues when used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should i just include the previous hardcoded values as a sane backup default?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a case where I'm not quite sure what I think, if these are completely missing the default config is either missing or messed up. Sane defaults are generally a good thing though and the user would get a warning that the config failed to load if that were the case. So you're probably right.

@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@krisgesling krisgesling force-pushed the refactor/recording-timout branch from 894da67 to d4d7d09 Compare August 19, 2020 11:05
@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

Copy link
Collaborator
@forslund forslund left a comment
8000

Choose a reason for hiding this comment

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

Looks all good.

@krisgesling krisgesling merged commit 6e0d5a9 into dev Aug 21, 2020
@krisgesling krisgesling deleted the refactor/recording-timout branch September 2, 2020 21: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.

4 participants
0