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

Fix double encoding issue in google_translate TTS #38429

Merged
merged 1 commit into from
Jul 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions homeassistant/components/google_translate/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import async_timeout
from gtts_token import gtts_token
import voluptuous as vol
import yarl

from homeassistant.components.tts import CONF_LANG, PLATFORM_SCHEMA, Provider
from homeassistant.const import HTTP_OK
Expand Down Expand Up @@ -129,7 +128,7 @@ async def async_get_tts_audio(self, message, language, options=None):
url_param = {
"ie": "UTF-8",
"tl": language,
"q": yarl.URL(part).raw_path,
"q": part,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised this was ever necessary, given that aiohttp should do this for all data passed to params

"tk": part_token,
"total": len(message_parts),
"idx": idx,
Expand Down