Make Google TTS secure (#11031)

* Make Google TTS secure

I noticed that my TTS queries were showing up in the log on my router, so I was curious if there was a way to make it secure. A quick search showed people using https instead of http (https://stackoverflow.com/questions/32053442/google-translate-tts-api-blocked), so I figure that should work. I am using hass.io, so I'm not actually sure how to test this, but its a pretty simple change.

* Fix the tts test.
This commit is contained in:
Paul Rabahy 2018-01-19 09:27:40 -05:00 committed by Andrey
parent 273db75248
commit d5df1c070d
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ REQUIREMENTS = ['gTTS-token==1.1.1']
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
GOOGLE_SPEECH_URL = "http://translate.google.com/translate_tts" GOOGLE_SPEECH_URL = "https://translate.google.com/translate_tts"
MESSAGE_SIZE = 148 MESSAGE_SIZE = 148
SUPPORT_LANGUAGES = [ SUPPORT_LANGUAGES = [

View File

@ -22,7 +22,7 @@ class TestTTSGooglePlatform(object):
"""Setup things to be run when tests are started.""" """Setup things to be run when tests are started."""
self.hass = get_test_home_assistant() self.hass = get_test_home_assistant()
self.url = "http://translate.google.com/translate_tts" self.url = "https://translate.google.com/translate_tts"
self.url_param = { self.url_param = {
'tl': 'en', 'tl': 'en',
'q': 'q':