hadware / voxpopuli

Python wrapper for Espeak and Mbrola, for simple local TTS
MIT License
28 stars 16 forks source link

Basic async support #20

Closed GnomedDev closed 3 years ago

GnomedDev commented 3 years ago

Please create an async branch on upstream, so I can swap the PR target to that, this shouldn't replace master.

I have spent the time and replaced subprocess.run with asyncio.subprocess.create_subprocess_shell in Voice._phonemes_to_audio and _str_to_phonemes, I also replaced urllib with aiohttp (massively speeding up voice_install.py).

Notes:

hadware commented 3 years ago

This is awesome! I'll create an async branch as requested, and try and merge your additions into the main package as best as I can :)

hadware commented 3 years ago

It's all good, go ahead and make your new PR.

GnomedDev commented 3 years ago

Do the tests pass for you? And on the subject of fstrings, should I make a PR to master and this branch to replace the % formatting with fstrings?

hadware commented 3 years ago

I'll have to enable tests on PR's, but for now they're broken even on the main branch since the target audio files don't have the same sound level as the default ones (as a consequence of your recent PR on volume config, but that's on me to fix that, just haven't had the time to do it yet).

GnomedDev commented 3 years ago

ah, makes sense, what's blocking this from being merged? docs?

hadware commented 3 years ago

Oh sorry i didn't notice that you already changed the branch, i didn't know we could do that (I was waiting for a new PR )

GnomedDev commented 3 years ago

Hey, can we talk via Discord about some ideas I have, my username#tag is Gnome!#6669

hadware commented 3 years ago

Sure! sorry, I was AFK. I sent you a friend request on discord.