Open Lord-V15 opened 3 years ago
Does anyone know why this voices package was used? I can't find anything py-voices. All I can find is pyTTSx.
For a grin, I tried py-gTTS. It worked really easily. However, the language codes seem to be different from the language codes of MSFT (at least in its translation service). Does anyone know of a mapping between the two (goog<->MSFT)?
I did find this, and example to generate speech via a MSFT service: https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/quickstart/python/text-to-speech
I hard-coded the list of languages in this file: https://github.com/newfies-dialer/python-msspeak/blob/develop/msspeak/voices.py
Some might be outdated by now. Ideally we should fetch the list directly from MSFT API.
I started down a similar path, adding a property to my Language class with translation names that MSFT uses to include a name that gTTS (nee google) uses. What I'm finding is, if gTTS supports a language, it tends to be the same iso-recognized name as what the MSFT services uses. However, sometimes there's an alternate name; some of the Chineses and Hebrew are two quick examples. I added a property for these and a try catch if the first name failed to retry the request using the alternate name.
Your solution is the better route. I'll try to get the languages from MSFT. If I have any success, I'll share. Thanks for sharing your file!
Hi, I was recently trying out the work done here but just importing msspeak returned me an error :
cannot import name 'find_voice' from 'voices'
In such a scenario, can you help me fix this ?