Closed issackelly closed 10 years ago
First of all, great project, I loved the idea! Put a Jarvis in your life!
I couldn't get it working because it was saying PyAudio was not imported (even though I had installed everything, including portaudio using brew).
I ended up downloading PyAudio from their web: http://people.csail.mit.edu/hubert/pyaudio/#downloads
Just in case someone else encountered the same problem. Hope this helps!
I tried to open a few pages (Twitter, Facebook) and asked him easy calculations (2*3) but he kept saying "Sorry sir, I'm unable to process that".
I assumed it may have something to do with a missing installed package so I also made sure that I had installed libav (for avconv) and ffmpeg (both using brew). It appeared that those packages were missing, so having all set now, I got an error in the console and Jarvis responds either he is unable to process that, that he didn't get it, microphone issues...
I took the liberty to copy-paste the outcome here, I apologize since it's a bit large but thought the more information about the error, the better.
[Eddie @ Jarvis-master] $ python jarvis.py
Loading brain from data/jarvis.brn... done (96945 categories in 3.13 seconds)
Jarvis is listening...
Processing...
Google Responds: u'<!DOCTYPE html>\n<html lang=en>\n <meta charset=utf-8>\n <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">\n <title>Error 403 (Forbidden)!!1</title>\n <style>\n *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/errors/logo_sm_2.png) no-repeat}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/errors/logo_sm_2_hr.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/errors/logo_sm_2_hr.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/errors/logo_sm_2_hr.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:55px;width:150px}\n </style>\n <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\n <p><b>403.</b> <ins>That\u2019s an error.</ins>\n <p>Your client does not have permission to get URL <code>/speech-api/v2/recognize?output=json&lang=en_US&key=AIzaSyCnl6MRydhw_5fLXIdASxkLJzcJh5iX0M4</code> from this server. <ins>That\u2019s all we know.</ins>\n'
Error parsing result document: u'<!DOCTYPE html>'
Traceback (most recent call last):
File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response
doc = json.loads(doc)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Error parsing result document: u'<html lang=en>'
Traceback (most recent call last):
File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response
doc = json.loads(doc)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Error parsing result document: u' <meta charset=utf-8>'
Traceback (most recent call last):
File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response
doc = json.loads(doc)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Error parsing result document: u' <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">'
Traceback (most recent call last):
File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response
doc = json.loads(doc)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Error parsing result document: u' <title>Error 403 (Forbidden)!!1</title>'
Traceback (most recent call last):
File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response
doc = json.loads(doc)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Error parsing result document: u' <style>'
Traceback (most recent call last):
File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response
doc = json.loads(doc)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Error parsing result document: u' *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/errors/logo_sm_2.png) no-repeat}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/errors/logo_sm_2_hr.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/errors/logo_sm_2_hr.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/errors/logo_sm_2_hr.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:55px;width:150px}'
Traceback (most recent call last):
File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response
doc = json.loads(doc)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Error parsing result document: u' </style>'
Traceback (most recent call last):
File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response
doc = json.loads(doc)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Error parsing result document: u' <a href=//www.google.com/><span id=logo aria-label=Google></span></a>'
Traceback (most recent call last):
File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response
doc = json.loads(doc)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Error parsing result document: u' <p><b>403.</b> <ins>That\u2019s an error.</ins>'
Traceback (most recent call last):
File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response
doc = json.loads(doc)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Error parsing result document: u' <p>Your client does not have permission to get URL <code>/speech-api/v2/recognize?output=json&lang=en_US&key=AIzaSyCnl6MRydhw_5fLXIdASxkLJzcJh5iX0M4</code> from this server. <ins>That\u2019s all we know.</ins>'
Traceback (most recent call last):
File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response
doc = json.loads(doc)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Jarvis is listening...
Processing...
[...]
Am I doing something wrong? I'm using OS X 10.9.2, in case that also helps!
Eddie
One quick solution I may think of right now is try changing Google API keys. Replace existing ones with your own keys. On May 17, 2014 10:45 PM, "Eddie Berbis" notifications@github.com wrote:
First of all, great project, I loved the idea! Put a Jarvis in your life!
I couldn't get it working because it was saying PyAudio was not imported (even though I had installed everything, including portaudio using brew).
I ended up downloading PyAudio from their web: http://people.csail.mit.edu/hubert/pyaudio/#downloads
Just in case someone else encountered the same problem. Hope this helps!
I tried to open a few pages (Twitter, Facebook) and asked him easy calculations (2*3) but he kept saying "Sorry sir, I'm unable to process that".
I assumed it may have something to do with a missing installed package so I also made sure that I had installed libav (for avconv) and ffmpeg (both using brew). It appeared that those packages were missing, so having all set now, I got an error in the console and Jarvis responds either he is unable to process that, that he didn't get it, microphone issues...
I took the liberty to copy-paste the outcome here, I apologize since it's a bit large but thought the more information about the error, the better.
[Eddie @ Jarvis-master] $ python jarvis.py Loading brain from data/jarvis.brn... done (96945 categories in 3.13 seconds) Jarvis is listening... Processing... Google Responds: u'<!DOCTYPE html>\n\n \n \n
Error 403 (Forbidden)!!1 \n \n \n403. That\u2019s an error.\n
Your client does not have permission to get URL
/speech-api/v2/recognize?output=json&lang=en_US&key=AIzaSyCnl6MRydhw_5fLXIdASxkLJzcJh5iX0M4
from this server. That\u2019s all we know.\n' Error parsing result document: u'<!DOCTYPE html>' Traceback (most recent call last): File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response doc = json.loads(doc) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Error parsing result document: u'' Traceback (most recent call last): File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response doc = json.loads(doc) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Error parsing result document: u' ' Traceback (most recent call last): File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response doc = json.loads(doc) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Error parsing result document: u' ' Traceback (most recent call last): File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response doc = json.loads(doc) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Error parsing result document: u'Error 403 (Forbidden)!!1 ' Traceback (most recent call last): File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response doc = json.loads(doc) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Error parsing result document: u' ' Traceback (most recent call last): File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response doc = json.loads(doc) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Error parsing result document: u' ' Traceback (most recent call last): File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response doc = json.loads(doc) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Error parsing result document: u'403. That\u2019s an error.' Traceback (most recent call last): File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response doc = json.loads(doc) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Error parsing result document: u'
Your client does not have permission to get URL
/speech-api/v2/recognize?output=json&lang=en_US&key=AIzaSyCnl6MRydhw_5fLXIdASxkLJzcJh5iX0M4
from this server. That\u2019s all we know.' Traceback (most recent call last): File "/Users/Eddie/Downloads/Jarvis-master/src/google_stt.py", line 54, in parse_response doc = json.loads(doc) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Jarvis is listening... Processing... [...]Am I doing something wrong? I'm using OS X 10.9.2, in case that also helps!
Eddie
— Reply to this email directly or view it on GitHubhttps://github.com/debugger22/Jarvis/pull/3#issuecomment-43415661 .
It's good. Thanks!