Merge pull request #2 from MycroftAI/dev

Rebase 18.8.9
pull/1912/head
Ale 2018-12-22 10:46:36 +01:00 committed by GitHub
commit a96ce1babf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View File

@ -61,6 +61,14 @@ class HotWordEngine(object):
def update(self, chunk):
pass
def stop(self):
""" Perform any actions needed to shut down the hot word engine.
This may include things such as unload loaded data or shutdown
external processess.
"""
pass
class PocketsphinxHotWord(HotWordEngine):
def __init__(self, key_phrase="hey mycroft", config=None, lang="en-us"):
@ -222,6 +230,10 @@ class PreciseHotword(HotWordEngine):
return True
return False
def stop(self):
if self.runner:
self.runner.stop()
class SnowboyHotWord(HotWordEngine):
def __init__(self, key_phrase="hey mycroft", config=None, lang="en-us"):

View File

@ -344,6 +344,7 @@ class RecognizerLoop(EventEmitter):
Reload configuration and restart consumer and producer
"""
self.stop()
self.wakeword_recognizer.stop()
# load config
self._load_config()
# restart

View File

@ -25,7 +25,7 @@ from mycroft.util.log import LOG
# START_VERSION_BLOCK
CORE_VERSION_MAJOR = 18
CORE_VERSION_MINOR = 8
CORE_VERSION_BUILD = 8
CORE_VERSION_BUILD = 9
# END_VERSION_BLOCK
CORE_VERSION_TUPLE = (CORE_VERSION_MAJOR,