Open gitagogaming opened 1 year ago
I tried implementing the code and it outputted a location value of 1. Not sure if that's the reason why the condition in line 4 was not met.
I also wrote a tkinter TTS app using it and I noticed that the engine.stop()
wasn't working either.
I tried implementing this solution from StackOverflow and it worked for me on Windows.
In my case, in the line of drivers/sapi5.py where it is written
self._tts.Speak('', 3)
I edited it to
self._tts.Skip('Sentence', 2147483647)
.
The number 2147483647 is the int.MaxValue
I've opened a pull request to fix this: https://github.com/Jiangshan00001/pyttsx4/pull/21
trying to interupt a TTS midway thru its speaking.. I have tried this with pyttsx3 and began looking for an alterantive and came across this library but it appears to still be an issue here as well..
I am using Windows 11 and Python 3.11 below is an example taken from the pyttsx3 documentation.