Closed kbeadl closed 8 years ago
Hey again, thanks for the update.
I'm looking into this issue at the moment. As you noted, it looks like PyAudio (PortAudio python bindings) doesn't work on OS X 10.11 and above. This is kind of shocking since I believe both Pocketsphinx and Google "SpeechRecognition" use PyAudio.
I will keep you updated as I try to solve this problem.
In the meantime you can always try disabling the STT features by going into settings.py and changing USE_STT to False.
Hey Kyle,
I just found out that a friend was able to install the dependencies using the following commands:
brew install portaudio brew link portaudio pip install pyaudio brew install swig pip install AthenaVoice
Give these a try and let me know how it goes!
Thanks, Connor
Connor, Those commands solved the problem. However, once the program runs and asks for a username, I enter a username.. "admin" and get this response. (Then, python quits unexpectedly and I have to restart Terminal.)
Logged in as: admin
~ Looking for modules in: '/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/athena/modules/active'
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/athena/brain.py", line 26, in find_mods
modules.append(obj())
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/athena/modules/active/athena_control.py", line 50, in init
tasks = [QuitTask(), ListModulesTask(), ToggleModuleTask()]
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/athena/modules/active/athena_control.py", line 17, in init
super().init(words=['quit', 'stop'])
TypeError: init() got an unexpected keyword argument 'words'
~ Error loading 'athena_control' init() got an unexpected keyword argument 'words' Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/athena/brain.py", line 26, in find_mods modules.append(obj()) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/athena/modules/active/twitter.py", line 37, in init super().init('twitter', tasks, priority=2) TypeError: init() got an unexpected keyword argument 'priority'
~ Error loading 'twitter' init() got an unexpected keyword argument 'priority'
~ Module Order: 'emotion', 'bitcoin', 'conversation', 'geo_info', 'music', 'spotify', 'voice_browse', 'weather', 'wolfram'
Hmm I'm not sure why it's only throwing an error on only those two modules. Did you install Hey Athena via "pip" or did you install the latest GitHub version? Also, does everything else seem to work?
I installed via pip3. Nothing seems to work, can't even get it started. I also deleted the user .yml and ran the program again. I was able to input the basic info (name, nickname, etc.) and Spotify name, but when it asked for
Username:
and I entered the username, it quit again.
There is one difference now, I also get the following text after all those errors that I listed in my last comment:
~ Hello, what can I do for you today?
Python(23330,0x7fff7b32c000) malloc: * error for object 0x3ff0000000000000: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug Abort trap: 6
I recommend trying to temporarily delete those two modules by going into "...site-packages/athena/modules/active" and deleting athena_control.py & twitter.py
If you have a python debugger console, then try stepping through this following program:
from athena import brain
brain.init()
brain.inst.run()
Here is the initialization flow in brain.init():
apis.find_apis()
self.login()
apis.verify_apis(self.user)
apis.list_apis()
self.find_mods()
self.list_mods() # prints module order
** PYTHON QUITS HERE? **
self.greet() # greet the user with basic Ascii Art logo
stt.init() # initialize the STT engine
self.quit_flag = False
If you get new error outputs, please let me know. I'm curious to see the exact traceback where the program is crashing.
@AdamLawicki Ahh yes, this is a known error with pocketsphinx/pyaudio that seems to be fixed by these commands:
$ brew uninstall cmu-sphinxbase
$ brew uninstall cmu-pocketsphinx
$ brew update
$ brew tap watsonbox/cmu-sphinx
$ brew install --HEAD watsonbox/cmu-sphinx/cmu-sphinxbase
$ brew install --HEAD wasonbox/cmu-sphinx/cmu-pocketsphinx
$ pip3 install HeyAthena
Also, be sure to install AVBin if you haven't already from: http://avbin.github.io/AVbin/Download.html
I tried that, to no avail. Here's how it responds:
from athena import main ~ Users: 'user'
~ Username: user
~ Logged in as: user ~ Looking for modules in: '/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/athena/modules/active'
~ Module Order: 'emotion', 'bitcoin', 'conversation', 'geo_info', 'music', 'spotify', 'voice_browse', 'weather', 'wolfram'
_ _ _
/ \ | |_| |__ ___ _ __ __ _
/ | **| ' \ / \ ' \ / _` | / \ || | | | / | | | (| | // **|| |||| ||\,_|
\ \ / /__ (_) ___ ___
\ \ / / _ | |/ **/ _ \
\ V / (_) | | (_| __/
_/ _**/|_|______|
~ Hello, what can I do for you today?
Python(23518,0x7fff7b32c000) malloc: * error for object 0x3ff0000000000000: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug Abort trap: 6
For those of you that still have this issue:
This worked fine on Mac OS X El Capitan. Please post a new issue if this spawns new errors.
"2016-02-03 18:36:22.256 Python[16078:189128] 18:36:22.256 WARNING: 140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h."
Obtained by commenting out everything in the init() function except:
if not os.path.exists(settings.LOGS_DIR): os.makedirs(settings.LOGS_DIR)
Occurred while using mac OS X El Captian