Closed Ziaeemehr closed 1 month ago
"from Foundation import *" used to import "objc" in the local dictinary. However, it is not the case in the recent versions of Python/objc. It is better import objc module explicitly using "import objc" in nsss.py.
I have gotten the same issue running pyttsx3
with Python 3.11.0 on MacOS 14.0
Solved by adding to nsss.py
import objc
and correcting line self = super(NSSpeechDriver, self).init() to
self = objc.super(NSSpeechDriver, self).init()
Had to remove attr['VoiceAge']
as well from NSSS.py
in order to get it to work. Apparently this ruins audio further.
Maybe downgrade pyobjc to 9.0.1 can help you.
Same issue with macOS 14.3.1 and Python 3.10
updated readme with :
For Mac, If you face error related to "objc" when running the
init()
method : Install 9.0.1 version of pyobjc : "pip install pyobjc==9.0.1"
I am getting the following error calling
I used
pip install pyttsx3
on conda env running on mac 2020, Sonma 14.3. I tried with python3.8 and 3.10. I already installed