"import pyttsx
engine = pyttsx.init()
engine.say('Sally sells seashells by the seashore.')
engine.say('The quick brown fox jumped over the lazy dog.')
engine.runAndWait()"
But IDLE keeps giving me the following error:
"Traceback (most recent call last):
File "/Users/Tuck/Desktop/Untitled.py", line 2, in
engine = pyttsx.init()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx/init.py", line 39, in init
eng = Engine(driverName, debug)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx/engine.py", line 45, in init
self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx/driver.py", line 64, in init
self._module = import(name, globals(), locals(), [driverName])
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx/drivers/nsss.py", line 18, in
from Foundation import *
ImportError: No module named Foundation"
So, I'm using the "Speaking Text" example from: http://pyttsx.readthedocs.io/en/latest/engine.html#the-engine-factory
"import pyttsx engine = pyttsx.init() engine.say('Sally sells seashells by the seashore.') engine.say('The quick brown fox jumped over the lazy dog.') engine.runAndWait()"
But IDLE keeps giving me the following error: "Traceback (most recent call last): File "/Users/Tuck/Desktop/Untitled.py", line 2, in
engine = pyttsx.init()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx/init.py", line 39, in init
eng = Engine(driverName, debug)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx/engine.py", line 45, in init
self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx/driver.py", line 64, in init
self._module = import(name, globals(), locals(), [driverName])
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx/drivers/nsss.py", line 18, in
from Foundation import *
ImportError: No module named Foundation"
What's going on? How can I fix this...? Thoughts?