-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Feature/mic_config - Add configuration option for microphone settings #2536
Conversation
Voight Kampff Integration Test Succeeded (Results) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a couple of minor comments, mainly organizational things.
mycroft/client/speech/mic.py
Outdated
@@ -199,11 +201,13 @@ class ResponsiveRecognizer(speech_recognition.Recognizer): | |||
|
|||
# The maximum seconds a phrase can be recorded, | |||
# provided there is noise the entire time | |||
RECORDING_TIMEOUT = 10.0 | |||
RECORDING_TIMEOUT = MIC_CONFIG.get( | |||
'microphone', {}).get('recording_timeout') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In python code style capital letters indicate constants, since these are no longer constants maybe we should make them lowercase object member and set them in __init__()
?
self.recording_timeout = config['recording_timeout']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved in newer commit to class init and followed code style of existing properties
Voight Kampff Integration Test Succeeded (Results) |
Voight Kampff Integration Test Failed (Results) |
Voight Kampff Integration Test Succeeded (Results) |
listener->recording_timeout: Maximum length of recording listener->recording_timeout: Maximum length of silence before stopping recording
2b39d1c
to
c5c0881
Compare
Voight Kampff Integration Test Succeeded (Results) |
Description
Adds a configuration option to set a custom timeout for microphone settings
How to test
Set configuration in USER / SYSTEM level mycroft.conf file to override default values
Contributor license agreement signed?
CLA [x] (Whether you have signed a CLA - Contributor Licensing Agreement