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

Resolves #142 for empty save_to_file() on darwin platform (NSSS driver) #276

Merged
merged 1 commit into from
Sep 14, 2024

Conversation

skibblenybbles
Copy link
Contributor

I traced the empty file / hanging behavior to _busy state management in the driver proxy. The underlying NSSpeechSynthesizer object behaves similarly for say() and save_to_file(), but save_to_file() was not updating the busy and completion states before starting synthesis the way that say() does. The state mismanagement caused the second call to save_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.

@Akul2010
Copy link

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

@skibblenybbles
Copy link
Contributor Author

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!

@nateshmbhat
Copy link
Owner

nateshmbhat commented Aug 15, 2024

did someone try this fix ? is it working ?

@nateshmbhat nateshmbhat merged commit 1544248 into nateshmbhat:master Sep 14, 2024
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

Successfully merging this pull request may close these issues.

3 participants