gTTS icon indicating copy to clipboard operation
gTTS copied to clipboard

Add support asyncio

Open Accipiter7 opened this issue 4 years ago • 7 comments

Since this is network dependent library it should support async / await for non-blocking access and Hence for better concurrency. Thanks

Accipiter7 avatar Sep 28 '20 16:09 Accipiter7

Indeed! Part of ripping out Python 2 support too..

pndurette avatar Sep 28 '20 20:09 pndurette

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.

thedaynos avatar Nov 03 '20 00:11 thedaynos

I agree with this, plus it makes work better with discord bots.

JDJGInc avatar Jan 01 '21 22:01 JDJGInc

+1 would be super useful in todays async/await world

jacksbox avatar Jan 26 '23 20:01 jacksbox