Open timolabs opened 7 years ago
I am having the same problem. Please let me know if anyone figures it out.
Try to disable the launche phrase in the bot.py
use_launch_phrase = False
It worked for me
To solve this, just enter lowercase caracteres in the contents of the variable use_launch_phrase and be happy!
I am running in Mac OS, and virtual enviornment (hhsmartmirror) Chriss-MBP:AI-Smart-Mirror CG$
When I say launch phrase "ok mirror"
it throws error message as below,
log below
Found face I'm listening Found audio Traceback (most recent call last): File "bot.py", line 254, in
bot.start()
File "bot.py", line 44, in start
if self.speech.is_call_to_action(recognizer, audio):
File "/Users/CG/workspace/AI-Smart-Mirror/speech.py", line 44, in is_call_to_action
speech = self.google_speech_recognition(recognizer, audio)
File "/Users/CG/workspace/AI-Smart-Mirror/speech.py", line 20, in google_speech_recognition
speech = recognizer.recognize_google(audio)
File "/Users/CG/workspace/AI-Smart-Mirror/hhsmartmirror/lib/python2.7/site-packages/speech_recognition/init.py", line 741, in recognize_google
best_hypothesis = max(actual_result["alternative"], key=lambda alternative: alternative["confidence"])
File "/Users/CG/workspace/AI-Smart-Mirror/hhsmartmirror/lib/python2.7/site-packages/speech_recognition/init.py", line 741, in
best_hypothesis = max(actual_result["alternative"], key=lambda alternative: alternative["confidence"])
KeyError: 'confidence'
when say other phrases, google will recognize but wont activate the mirror.