0

I installed Pyttsx3 with mamba on Mac OS. All was working fine. Then I upgraded to Mac OS Ventura 13.01 and I get an error on this minimal working example:

import pyttsx3
engine = pyttsx3.init()
engine.getProperty('voices')

The third line throws an error. Any ideas on why I get this error and how to fix it?:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/pyttsx3/engine.py", line 146, in getProperty
    return self.proxy.getProperty(name)
  File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/pyttsx3/driver.py", line 173, in getProperty
    return self._driver.getProperty(name)
  File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/pyttsx3/drivers/nsss.py", line 69, in getProperty
    return [self._toVoice(NSSpeechSynthesizer.attributesForVoice_(v))
  File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/pyttsx3/drivers/nsss.py", line 69, in <listcomp>
    return [self._toVoice(NSSpeechSynthesizer.attributesForVoice_(v))
  File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/pyttsx3/drivers/nsss.py", line 64, in _toVoice
    attr['VoiceAge'])
  File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/objc/_convenience_mapping.py", line 18, in __getitem__objectForKey_
    return container_unwrap(res, KeyError, key)
  File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/objc/_convenience.py", line 122, in container_unwrap
    raise exc_type(*exc_args)
KeyError: 'VoiceAge'
fiacobelli
  • 1,960
  • 5
  • 24
  • 31

0 Answers0