-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Issues-2534 - language fallback fix #2535
Conversation
Hello, @luca-vercelli, thank you for helping with the Mycroft project! We welcome everyone To protect yourself, the project, and users of Mycroft technologies we require Please visit https://mycroft.ai/cla to initiate this one-time signing. Thank |
Voight Kampff Integration Test Succeeded (Results) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing this!
I found a minor issue but apart from that this looks good. I'll try it out for real tomorrow but it looks good for merging after the issue is fixed and CLA is signed.
Hello @luca-vercelli! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-04-15 10:47:49 UTC |
Voight Kampff Integration Test Succeeded (Results) |
1 similar comment
Voight Kampff Integration Test Succeeded (Results) |
Tested it with swedish and works great! I had one thought when viewing it offline, it might be cleaner to have the language change done in the The def __init__(self, lang, config):
super(GoogleTTS, self).__init__(lang, config, GoogleTTSValidator(
self), 'mp3')
langs = tts_langs()
if self.lang.lower() not in langs:
if self.lang[:2].lower() in langs:
self.lang = self.lang[:2]
else:
raise ValueError("Language not supported by gTTS: {}"
.format(self.lang)) What do you think? |
I agree, you are right. |
Voight Kampff Integration Test Succeeded (Results) |
Hmmm, not sure really, the "validate" in the method name indicates that it is a check and should not do any modifications. I would split it up and do the modification in the |
Voight Kampff Integration Test Succeeded (Results) |
Voight Kampff Integration Test Failed (Results) |
CLA received, but looks like this may still be in progress. |
Voight Kampff Integration Test Succeeded (Results) |
update the lang value if currently set language doesn't exist.
I think this looks good, I'll rebase it and squash the pep8 / typo fixes into their parent commits to make the commit history cleaner and then I'll merge it. |
f5147af
to
a9cfa51
Compare
Voight Kampff Integration Test Succeeded (Results) |
Description
Fixes #2534
How to test
Run mycroft-core with language it-it, and use Google Voice as TTS
Contributor license agreement signed?
CLA