ANGELELF708 / AETOAB

AETOAB is an AI Chatbot with a focus on Discord and Twitch entertainment.
0 stars 0 forks source link

Doesn't work on Mac #1

Open ANGELELF708 opened 1 year ago

ANGELELF708 commented 1 year ago

AETOAB-Chan's official server is ran off of a MacBook running Catalina version 10.15.7. However I test on a custom built Windows 10 PC. The Macbook for whatever reason doesn't work with pyttsx3 (AETOAB's TTS engine.) It works just fine on my custom. Here is the given error:

Traceback (most recent call last):
  File "/Users/[redacted]/Desktop/AETOAB's Everything/AEChatBot/AETOABdiscord.py", line 29, in <module>
    engine = pyttsx3.init()
  File "/Users/[redacted]/Desktop/AETOAB's Everything/env/lib/python3.8/site-packages/pyttsx3/__init__.py", line 46, in init
    eng = Engine(driverName, debug)
  File "/Users/[redacted]/Desktop/AETOAB's Everything/env/lib/python3.8/site-packages/pyttsx3/engine.py", line 52, in __init__
    self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
  File "/Users/[redacted/Desktop/AETOAB's Everything/env/lib/python3.8/site-packages/pyttsx3/driver.py", line 75, in __init__
    self._module = importlib.import_module(name)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/[redacted]/Desktop/AETOAB's Everything/env/lib/python3.8/site-packages/pyttsx3/drivers/nsss.py", line 10, in <module>
    class NSSpeechDriver(NSObject):
  File "/Users/[redacted]/Desktop/AETOAB's Everything/env/lib/python3.8/site-packages/objc/_transform.py", line 68, in processClassDict
    new_value = transformAttribute(key, value, class_object, protocols)
  File "/Users/[redacted]/Desktop/AETOAB's Everything/env/lib/python3.8/site-packages/objc/_transform.py", line 473, in transformAttribute
    raise objc.BadPrototypeError(
objc.BadPrototypeError: 'initWithProxy' expects 0 arguments, <function NSSpeechDriver.initWithProxy at 0x1139a2dc0> has 1 positional arguments
  1. I've tried using pyttsx, but that has some issue where it cannot find any module called engine.
  2. I've tried switching engineio in AETOABdiscord.py to engine. I've tried a combination of both.
  3. I tried going into "/Users/[redacted]/Desktop/AETOAB's Everything/env/lib/python3.8/site-packages/pyttsx3/drivers/nsss.py" and importing the (supposedly) missing dependencies. before that:
  4. I tried installing older versions of both pyttsx and pyttsx3.
  5. I've also tried commenting out the errors in nsss.py.

I've been working on this for like a week, I'm pretty exhausted, but I'm fairly set on using pyttsx/pyttsx3 for its versatility. If it comes to it, at this rate I'll take whatever works. I might use gTTS instead, but I'm also considering just buying a cheap thinkpad, but idk.

ANGELELF708 commented 1 year ago

Update! Immediately after posting this I thought "Fuck it, I'll try gTTS!" Here are the unfortunate results:

def TTSave(TTString):
    TTSengine = gTTS(text=TTString, lang="en", slow=False)
    TTSengine.save("TTString.mp3")

I updated the TTSave method to use gTTS instead as seen above. Here is the resulting error:

Traceback (most recent call last):
  File "/Users/[redacted]/Desktop/AETOAB's Everything/AEChatBot/AETOABdiscord.py", line 7, in <module>
    from gtts import gTTS
  File "/Users/[redacted]/Desktop/AETOAB's Everything/env/lib/python3.8/site-packages/gtts/__init__.py", line 3, in <module>
    from .tts import gTTS, gTTSError
  File "/Users/[redacted]/Desktop/AETOAB's Everything/env/lib/python3.8/site-packages/gtts/tts.py", line 8, in <module>
    import requests
  File "/Users/[redacted]/Desktop/AETOAB's Everything/env/lib/python3.8/site-packages/requests/__init__.py", line 43, in <module>
    import urllib3
  File "/Users/[redacted]/Desktop/AETOAB's Everything/env/lib/python3.8/site-packages/urllib3/__init__.py", line 38, in <module>
    raise ImportError(
ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3. See: https://github.com/urllib3/urllib3/issues/2168

Also for the sake of clarity line 7 is: from gtts import gTTS It was worth a shot ;/