Open skibblenybbles opened 1 year ago
Since this is no longer being updated, would you like to join me as I try to maintain this project when I can? Link is here: https://github.com/Akul-AI/rlvoice-1
Since this is no longer being updated, would you like to join me as I try to maintain this project when I can? Link is here: https://github.com/Akul-AI/rlvoice-1
Hi @Akul2010 - I ended up publishing this single bugfix to PyPi as pyttsx3-alt
. I didn't want to fracture the original pyttsx3
even more, but I needed to get this bugfix into production. I would actually prefer not to become a maintainer for pyttsx3
or any spinoff projects, but please feel free to incorporate this two-line bugfix in your project.
I'll consider replacing pyttsx3
with rlvoice
for any future updates I make to my pyttsx3
-dependent applications. Thank you!
I traced the empty file / hanging behavior to
_busy
state management in the driver proxy. The underlyingNSSpeechSynthesizer
object behaves similarly forsay()
andsave_to_file()
, butsave_to_file()
was not updating the busy and completion states before starting synthesis the way thatsay()
does. The state mismanagement caused the second call tosave_to_file()
to start an event loop that would never be terminated.The intentions of the state management in the driver proxy are not perfectly clear to me, so this may not be a completely robust fix, but it does resolve the hanging behavior. Please note that you still must save
.aiff
or.wav
files with the NSSS driver, not.mp3
.