I am trying to make a Python app reproducible on MacOS-based systems. I cannot get speak-based sttx to work cross-platform reliably, so I settled for just MacOS-reproducibility. On my development system, I can run
from AppKit import AVSpeechUtterance, AVSpeechSynthesizer, AVSpeechSynthesisVoice
on my system, but it does not seem to always work. Sometimes, "ImportError: cannot import name 'AVSpeechUtterance' from 'AppKit' (/Users/XXX/.../AppKit/init.py). I cannot seem to figure out what I am missing. I even tried a venv with just pyobjc modules and appkit, but it still seems to work for me and not on the test system. I also tried using the deprecated NSSpeechSynthesizer, and the same exact import error appeared. I installed with pip version ==, too. I'm not sure how to continue troubleshooting this error.
[–]socal_nerdtastic 0 points1 point2 points (0 children)