You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in my python program I am starting a thread. This thread creates a engine object and invokes engine.runAndWait() . engine.stop() (inside onWord()) is called to stop the engine and end the thread. After this another identical thread using the same function is created . Now the problem starts. even though the first thread is dead. something still interferes with the second thread and does not allow it to work properly.
Basically what I want to do is stop a previous pyttsx instance and start another pyttsx instance. All this effort is directed at having something like a pause feature...
You're the first person to try using the same engine in multiple threads. My fault for not stating that a single engine instance is not thread safe. In fact, I'm not certain that multiple engine instances will work across threads either as the underlying driver instance might be a singleton or unsafe too.
in my python program I am starting a thread. This thread creates a engine object and invokes engine.runAndWait() . engine.stop() (inside onWord()) is called to stop the engine and end the thread. After this another identical thread using the same function is created . Now the problem starts. even though the first thread is dead. something still interferes with the second thread and does not allow it to work properly.
Basically what I want to do is stop a previous pyttsx instance and start another pyttsx instance. All this effort is directed at having something like a pause feature...
Here is the full code of my tiny 'program' : http://pastebin.com/dnCd3KjS
Hope I was able to make myself clear.
The text was updated successfully, but these errors were encountered: