Open MikeKadoshnikov opened 3 months ago
Found a way to have it not infinite loop but it requires us to initialize pyttsx3 every time we want the robot to say something, although it works it seems somewhat resource intensive since we have to reinitialize it everytime
Using this package in a Robotics project, we have a function for speaking below: def say(self, text): self.face.set_robot_state("talking") if (self.voice._inLoop): self.voice.endLoop() self.voice.say(text) self.voice.runAndWait() self.face.set_robot_state("idle")
and the runAndWait() function ends up running into an infinite loop. Going through PyCharm debugging I have narrowed it down to sapi5.py where it is getting stuck in startLoop(self) and looking at the code it is not obvious how this while loop is supposed to stop. Haven't found any resources on circumventing this issue, as its unfortunate since we wanted to use this package for our assignments, we will have to look for an alternative.![pyttsx3issue](https://github.com/nateshmbhat/pyttsx3/assets/35706715/9ea919df-da91-4ab1-b856-498be475d98a)