Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not an issue, but a question. Ending a pyttsx thread #4

Open
gyaaniguy opened this issue Jul 21, 2011 · 2 comments
Open

Not an issue, but a question. Ending a pyttsx thread #4

gyaaniguy opened this issue Jul 21, 2011 · 2 comments

Comments

@gyaaniguy
Copy link

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.

@gyaaniguy
Copy link
Author

Oops, that pastebin doesn't work. this one will: http://pastebin.com/2sv5rnDg

@parente
Copy link
Collaborator

parente commented Jul 24, 2011

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants