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

the wrapper freezes in newer Python versions at exit #7

Open
rmcpantoja opened this issue Jul 31, 2024 · 2 comments
Open

the wrapper freezes in newer Python versions at exit #7

rmcpantoja opened this issue Jul 31, 2024 · 2 comments

Comments

@rmcpantoja
Copy link

rmcpantoja commented Jul 31, 2024

Hi @Aculeasis,
First, great job expanding this Python binding!
I have Python 3.10 64-bit to reproduce, and RHVoice 1.14 DLL for 64-bit.
Speech synthesis, via streaming or to a file, does successfully.
But, when exit, in any project that uses this, Python freezes. The only way to exit is killing python.exe (from taskkill on Windows). I'm always using 1 thread.
This is also reproduceable in sayshell.py when pressing ctrl+c to exit. May due to threading changes in previous Python versions?
Cheers.

@Aculeasis
Copy link
Owner

Did you call tts.join() before exit?

You should call it manually. Also, you can catch system signals (something like that).

This is also reproduceable in sayshell.py when pressing ctrl+c to exit. May due to threading changes in previous Python versions?

No, It always worked like this. Type exit or try benchmarks.py. sayshell.py doesn't handle KeyboardInterrupt so threads never stop.

@rmcpantoja
Copy link
Author

Hi @Aculeasis,
Thanks for pointing out. I am using your wrapper in a discord.py bot. Upon closing the bot, I am forced to kill the Python process. I can work on forced closing of signals. Even so, I would suggest you a free or release method that releases the resources of RHVoice and its threads, and we can handle that from atexit or so.
Cheers.

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

No branches or pull requests

2 participants