-
Notifications
You must be signed in to change notification settings - Fork 363
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
Add support asyncio #228
Comments
Indeed! Part of ripping out Python 2 support too.. |
I needed to use gtts in an async type of way so I set up a queue and a separate python script that only reads text messages from the queue and then calls gtts. That's all it does. Just loops until a message is received and then calls/plays. |
I agree with this, plus it makes work better with discord bots. |
+1 would be super useful in todays async/await world |
Hey guys, recently for a discord bot I work on, I've forked gTTS to add experimental support for async / await. Feel free to have a look and use it if you want, just be aware that I have not tested it that extensively and I'm not going to be doing any extra work on it other than if I find a critical bug myself. Also just FYI, a significant portion of the async code was generated by AI to convert it from sync to async but it all seems to work. https://github.com/CDE90/gTTS |
Ah nice! I'll check it out. Also appreciate the gen AI disclosure! 😝 I wanted to do lots of clean up to that stream function anyway. |
I would love if this library had async libraries based with aiohttp. |
Since this is network dependent library it should support async / await for non-blocking access and Hence for better concurrency.
Thanks
The text was updated successfully, but these errors were encountered: