From d5df1c070d7413b65268af1bbd2278ce82652652 Mon Sep 17 00:00:00 2001 From: Paul Rabahy Date: Fri, 19 Jan 2018 09:27:40 -0500 Subject: [PATCH] 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. --- homeassistant/components/tts/google.py | 2 +- tests/components/tts/test_google.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tts/google.py b/homeassistant/components/tts/google.py index e405e5be531..85b223864e9 100644 --- a/homeassistant/components/tts/google.py +++ b/homeassistant/components/tts/google.py @@ -21,7 +21,7 @@ REQUIREMENTS = ['gTTS-token==1.1.1'] _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 SUPPORT_LANGUAGES = [ diff --git a/tests/components/tts/test_google.py b/tests/components/tts/test_google.py index a68aeef80e3..6a2d2c65035 100644 --- a/tests/components/tts/test_google.py +++ b/tests/components/tts/test_google.py @@ -22,7 +22,7 @@ class TestTTSGooglePlatform(object): """Setup things to be run when tests are started.""" 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 = { 'tl': 'en', 'q':