#484 - Fixing STT config initialization

- Ensuring config is set to the specified module
- Initializing credential from the selected module configuration
pull/446/merge
Jonathan D'Orleans 2017-01-28 00:11:14 -05:00 committed by Augusto Monteiro
parent d13b539644
commit 04359f000f
1 changed files with 3 additions and 2 deletions

View File

@ -33,8 +33,9 @@ class STT(object):
def __init__(self):
config_core = ConfigurationManager.get()
self.lang = str(self.init_language(config_core))
self.config = config_core.get("stt")
self.credential = self.config.get(self.config.get("module"), {})
config_stt = config_core.get("stt", {})
self.config = config_stt.get(config_stt.get("module"), {})
self.credential = self.config.get("credential", {})
self.recognizer = Recognizer()
@staticmethod