Closed llfstudyup1104 closed 7 months ago
I'm not sure what could be the problem here. This was supposed to be fixed in PR #4. Is it possible you could try using some other engine while I see what the problem is?
Just opened the same issue #301 on the original branch. Have not been able to get it to run. Can try again with this version but seems the error message etc. is identical.
Yes, I try to work on this in my free time but MacOS speech engine is infamously buggy lol.
Hello @llfstudyup1104 , I have just made and released a new fix that I think might work. I noticed that the Foundation
library was called, even though it wasn't imported. Please check to see if it works now, as I don't own a MacOS and can't check anything MacOS related.
Describe the bug NameError after init engine。 Error infor: NameError: name 'objc' is not defined. Did you mean: 'object'?
To Reproduce Steps to reproduce the behavior:
pip install rlvoice-1 on local MacOS Sonama Version 14.0
Import rlvoice and init the engine
See error info
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rlvoice/init.py", line 22, in init
eng = Engine(driverName, debug)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rlvoice/engine.py", line 30, in init
self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rlvoice/driver.py", line 49, in init
self._module = importlib.import_module(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rlvoice/drivers/nsss.py", line 13, in
class NSSpeechDriver(NSObject):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rlvoice/drivers/nsss.py", line 14, in NSSpeechDriver
@objc.python_method
^^^^
NameError: name 'objc' is not defined. Did you mean: 'object'?