Adri6336 / gpt-voice-conversation-chatbot

Allows you to have an engaging and safely emotive spoken / CLI conversation with the AI ChatGPT / GPT-4 while giving you the option to let it remember things discussed.
GNU General Public License v3.0
300 stars 50 forks source link

Does this work on Mac? #5

Closed zswitten closed 1 year ago

zswitten commented 1 year ago

I saw the instructions only mention Windows + Linux, but figured I'd try it out anyway. I installed espeak with brew, but when I run main.py I get this trace:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/zswitten/gpt-voice-conversation-chatbot/main.py", line 98, in main_loop
    self.display = pygame.display.set_mode((500, 500), pygame.RESIZABLE)
pygame.error: NSWindow drag regions should only be invalidated on the Main Thread!
Assertion failed: (NSViewIsCurrentlyBuildingLayerTreeForDisplay() != currentlyBuildingLayerTree), function NSViewSetCurrentlyBuildingLayerTreeForDisplay, file NSView.m, line 13477.
Illegal instruction: 4
Adri6336 commented 1 year ago

Heyo, I super appreciate your interest in this! The error shows that the main.py script is incompatible with MacOS due to differences in the installed Python version from the Linux and Windows ones. Unfortunately, mostly because I don't have access to a Mac for testing purposes, I don't plan on adding explicit support for that OS.

On the plus side, it looks like the problem principally stems from my implementation of the pygame gui. This means that the bot itself should work, so someone with a Mac could re-code the main.py script to make it compatible in the future. This would rely on someone else doing it though, so it's probably not going to happen soon if at all.

For the time-being, there's a good chance you'll still be able to use the gptcli.py script. It doesn't use pygame, so this error should not present. In any case, I apologize for the inconvenience yo