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

Added lang=None to get_tts for compatibility #1

Merged
merged 1 commit into from
Sep 6, 2021
Merged

Added lang=None to get_tts for compatibility #1

merged 1 commit into from
Sep 6, 2021

Conversation

Joanguitar
Copy link
Contributor

Done nothing, just want this TTS to be able to be called with the lang parameter for consistency with the other TTS.
To the best of my knowledge Mimic only works in English.

@JarbasAl JarbasAl merged commit 6088ebf into OpenVoiceOS:master Sep 6, 2021
@ChanceNCounter
Copy link

Lingua Franca deprecated Lang=None on purpose. It's important never to pass lang=None to its functions. I just wanna make sure this doesn't imply None is being passed around elsewhere in your stack.

In the event that no lang parameter is specified, functions should fall back on the configured default language where the parameter is required, or omit it entirely if possible. The language switching routines need to keep loaded and default languages in sync between different components (TTS, STT, parser module, skills.) mycroft.util and its wrapped lingua_franca/lingua_nostra only support lang=None for backwards compat, and they should pop a DeprecationWarning when you pass it. If not, that's a whoopsie.

. If no lang parameter is passed, the modules assume you intended to invoke the current default language. If a lang parameter is passed, the modules first try it as a full BCP language code (en-US), then as a "primary" code (en) and then they get mad, because calling unloaded or unsupported language codes is impossible. In that context, we (coincidentally 2/4 of the same devs, Jarbas and I) concluded that lang=None - null as a language code - is conceptually undefinable behavior, and it should behave as such.

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

Successfully merging this pull request may close these issues.

3 participants