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

No longer working due to dependency issue #8

Open
Lord-V15 opened this issue Aug 3, 2021 · 3 comments
Open

No longer working due to dependency issue #8

Lord-V15 opened this issue Aug 3, 2021 · 3 comments

Comments

@Lord-V15
Copy link

Lord-V15 commented Aug 3, 2021

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'

Screenshot 2021-08-03 at 6 13 22 PM

In such a scenario, can you help me fix this ?

@m-weintraub
Copy link

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

@areski
Copy link
Collaborator

areski commented Feb 25, 2023

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.

@m-weintraub
Copy link

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!

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

3 participants