pyttsx3
pyttsx3 copied to clipboard
Calling engine.runAndWait() causes my Kivy app to close
Hello,
Firstly, thank you very much for making this module. This is helping put me on a path to creating a universal TTS app for people with accessibility issues. I really appreciate the time you've put into this.
So my issue is that only when I queue a phrase into the speech engine and invoke the engine.runAndWait()
method, the app will speak the text, but then it will close out. I created a new script and only ran the pyttsx3 code and it seemed to run fine. I had a thought that maybe pyttsx3 was sending a signal to the interpreter to quit.
FYI, I checked the shell's last exit code, which was zero (0).
An aside: For MacOS, why don't you use the internal 'say' builtin command for MacOS? That's been there since at least 2002.
I am facing the same issue when calling engine.runAndWait() with Kivy. Using pyttsx3 library with python 3.8.5 on MacOS Big Sur.
@ZeroOneLabs were you able to find a solution? Here is my error and code.
2021-08-30 14:51:47.400 python[28231:1938050] -[OC_BuiltinPythonNumber _fastCStringContents:]: unrecognized selector sent to instance 0x7fb4da5eb9e0
engine = pyttsx3.init()
engine.setProperty('rate', 100)
engine.say(str(self.Message))
engine.runAndWait()
Hi @coling-git,
Unfortunately no. I ended up abandoning this project for now. I figured I'd have to write my own custom class/function to use MacOS's internal say
command along with asyncio to put it into the background.
I am facing the same issue when calling engine.runAndWait() with Kivy. Using pyttsx3 library with python 3.8.5 on MacOS Big Sur.
@ZeroOneLabs were you able to find a solution? Here is my error and code.
2021-08-30 14:51:47.400 python[28231:1938050] -[OC_BuiltinPythonNumber _fastCStringContents:]: unrecognized selector sent to instance 0x7fb4da5eb9e0
engine = pyttsx3.init() engine.setProperty('rate', 100) engine.say(str(self.Message)) engine.runAndWait()
Sorry to bug so far later but have you found a solution at this point?
No. I abandoned my own project that used pyttsx3
for now and have left this thread open for other people to comment and/or post a solution.
No. I abandoned my own project that used
pyttsx3
for now and have left this thread open for other people to comment and/or post a solution.
Shoot. Well thanks anyway.