From dfb8f4f2e3fd845f6ace2b304f23d0f7b62d9f7f Mon Sep 17 00:00:00 2001 From: zoe Date: Wed, 21 Feb 2018 12:01:26 -0800 Subject: [PATCH] Change: persona to array --- client/mic.py | 5 +++-- jasper.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/mic.py b/client/mic.py index 401cddbd6..20aa84d83 100644 --- a/client/mic.py +++ b/client/mic.py @@ -178,8 +178,9 @@ def passiveListen(self, PERSONA): # check if PERSONA was said transcribed = self.passive_stt_engine.transcribe(f) - if any(PERSONA in phrase for phrase in transcribed): - return (THRESHOLD, PERSONA) + for p in PERSONA: + if any(p in phrase for phrase in transcribed): + return (THRESHOLD, PERSONA) return (False, transcribed) diff --git a/jasper.py b/jasper.py index 5056e3eeb..4a12941a6 100755 --- a/jasper.py +++ b/jasper.py @@ -117,7 +117,7 @@ def run(self): salutation = "How can I be of service?" self.mic.say(salutation) - conversation = Conversation("JASPER", self.mic, self.config) + conversation = Conversation(["JASPER"], self.mic, self.config) conversation.handleForever() if __name__ == "__main__":