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

Commit

Permalink
Merge pull request #2668 from MycroftAI/refactor/recording-timout
Browse files Browse the repository at this point in the history
remove hardcoded timeouts - now in mycroft.conf
  • Loading branch information
krisgesling authored Aug 21, 2020
2 parents 40139b9 + d4d7d09 commit 6e0d5a9
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions mycroft/client/speech/mic.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,16 +323,6 @@ class ResponsiveRecognizer(speech_recognition.Recognizer):
# before a phrase will be considered complete
MIN_SILENCE_AT_END = 0.25

# TODO: Remove in 20.08
# The maximum seconds a phrase can be recorded,
# provided there is noise the entire time
RECORDING_TIMEOUT = 10.0

# TODO: Remove in 20.08
# The maximum time it will continue to record silence
# when not enough noise has been detected
RECORDING_TIMEOUT_WITH_SILENCE = 3.0

# Time between pocketsphinx checks for the wake word
SEC_BETWEEN_WW_CHECKS = 0.2

Expand Down Expand Up @@ -375,13 +365,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)
10.0)

# The maximum time it will continue to record silence
# when not enough noise has been detected
self.recording_timeout_with_silence = listener_config.get(
'recording_timeout_with_silence',
self.RECORDING_TIMEOUT_WITH_SILENCE)
'recording_timeout_with_silence', 3.0)

@property
def account_id(self):
Expand Down

0 comments on commit 6e0d5a9

Please sign in to comment.