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

Google Translate TTS pronounce urlencoded characters #38339

Closed
divanikus opened this issue Jul 28, 2020 · 55 comments · Fixed by #38429
Closed

Google Translate TTS pronounce urlencoded characters #38339

divanikus opened this issue Jul 28, 2020 · 55 comments · Fixed by #38429

Comments

@divanikus
Copy link
Contributor

divanikus commented Jul 28, 2020

The problem

I'm trying to use Google Translate TTS in it's default configuration. It does work, but for some reason it pronounces messages like if they are urlencoded. For example, "Hello world!" is pronounced as "Hello percent twenty world" (which is "hello%20world" i believe)

Environment

  • Home Assistant Core release with the issue: 0.113.2
  • Last working Home Assistant Core release (if known): unknown
  • Operating environment (OS/Container/Supervised/Core): hassio
  • Integration causing this issue: google_translate
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/google_translate/

Problem-relevant configuration.yaml

tts:
  - platform: google_translate

Additional information

image

Here's the rendered audio:
d3486ae9136e7856bc42212385ea797094475802_en_-_google_translate.zip

@SeanPM5
Copy link
Contributor

SeanPM5 commented Jul 29, 2020

Happens here as well after installing 0.113.2

There's a forum thread about this here so it seems to be a widespread issue.

@wolverinevn
Copy link

Same issue.

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Jul 29, 2020

Just to chime in here and put some weight on the issue, posted this in the community https://community.home-assistant.io/t/0-113-automations-scripts-and-even-more-performance/213387/383?u=mariusthvdb

Hope this can be fixed in 113.3 ;-)

@probot-home-assistant
Copy link

Hey there @awarecan, mind taking a look at this issue as its been labeled with an integration (google_translate) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@hmmbob
Copy link
Contributor

hmmbob commented Jul 29, 2020

@dshokouhi
Copy link
Member

I do not see this issue in my venv install, it seems most everyone here is on docker/hassOS?

@hmmbob
Copy link
Contributor

hmmbob commented Jul 29, 2020

Yes for me on Docker (HA Container).

@rogerjak
Copy link

Same issue here. HassOS 5, Core 113.2.

@p1ranha
Copy link

p1ranha commented Jul 29, 2020

same here Hassio 0.113.2

@antoweb
Copy link

antoweb commented Jul 29, 2020

same here hassio 0.113.2

@McGiverGim
Copy link

Another with the problem in Hassio 0.113.2. I sent the same text to the phone and it's ok, only TTS is wrong.

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Jul 29, 2020

(how can we resize images here? sorry for the huge picture)

On image

@AntiqS
Copy link

AntiqS commented Jul 30, 2020

Same here, was running 0.113.0 half an hour ago, and after the upgrade to 0.113.2 getting %20

@blair287
Copy link

Same issue

@rpitera
Copy link

rpitera commented Jul 30, 2020

Same here, glad it's not just me. Home Assistant 0.113.2 - HassOS 4.11

@jjMustang
Copy link

Same issue here. Running in Docker on Ubuntu.

@jazbraz
Copy link

jazbraz commented Jul 30, 2020

Same issue here.

@cpunella
Copy link

cpunella commented Jul 30, 2020

I confirm, same issue after upgrading to 0.113.2

@miniontechy
Copy link

same here after upgading to 0.113.2. putting single or double quotes around message doesn't make any difference.

my script:

speakarming:
alias: speak of alarm being activated
sequence:

  • service: media_player.volume_set
    data:
    entity_id: media_player.kitchen_speaker
    volume_level: 0.5
  • service: tts.google_say
    entity_id: media_player.kitchen_speaker
    data:
    message: "Engaging cameras. Alarm activating in 30 seconds."

@sermayoral
Copy link
Contributor

Same here. Home Assistant Supervised 0.113.2 over RaspberryPiOS in a rpi4 4gb

@MechEng70
Copy link

Removed the spaces and it works. Doesn't sound too bad.

@antoweb
Copy link

antoweb commented Jul 30, 2020

For me removing space cause bad pronounce (Italian)

@jmijn
Copy link

jmijn commented Jul 30, 2020

You can use dashes now as a workaround. Seems like they are not pronounced (this-is-a-test).

Hopefully this gets fixed soon as my Google Home is going crazy :D

@orson1282
Copy link
Contributor

Same here, 0.113.2 Running in Docker on Ubuntu.

I did notice the following tho, *automations like this one work fine.

trigger:
- platform: time_pattern
  seconds: "5"
- service: tts.google_say
      entity_id: media_player.living_room
      data:
        message: "This is a test."

But *scripts like this one say the "%20" for all the spaces.

- service: tts.google_say
      entity_id: media_player.living_room
      data:
        message: "This is a test."

Also if I run it via the developer tools > services and choose tts.google_say it also says the "%20" for all of the spaces in the message.

@hossamnagy
Copy link

hossamnagy commented Jul 31, 2020

Another related issue is the way numbers are pronounced. For the text "The -time-now-is-11-43" is pronounced as "The time now is one one four three " instead of "The time now is eleven forty three "

@KentuckyMC
Copy link

Same issue here

@sotima
Copy link

sotima commented Jul 31, 2020

Same here
HA 0.113.2 HassOS 4.11;

And its not only the spaces but also german "umlauts" (ä, ö, ü, ß) !

@frenck
Copy link
Member

frenck commented Jul 31, 2020

I've been able to pin-point the exact reason why this happens. Looking into fixing it.

@frenck
Copy link
Member

frenck commented Jul 31, 2020

PRs are up, marked them for the 0.113.3 milestone. Sorry about this happening, it wasn't a direct cause of any change in the 0.113.2 release, but a sub-dependency of Home Assistant was the root cause (which made it less obvious to pin-point).

Fix and more permanent measures to prevent this again, have been put in place.

@hmmbob
Copy link
Contributor

hmmbob commented Jul 31, 2020

Thanks for your help, Frenck. As said, fix works in my set-up indeed.

@KentuckyMC
Copy link

Awesome work! Thanks for the quick fix.

@sotima
Copy link

sotima commented Jul 31, 2020

Great work! Thank you very much for your super fast response! You guys are awesome! 🥇

@miniontechy
Copy link

Thanks Frenck & all the folk at Home Assistant.
LOVE your work!

@antoweb
Copy link

antoweb commented Jul 31, 2020

Hello, thanks for fast response. How to install 0.113.3 in hassio? I must wait new release?

@frenck
Copy link
Member

frenck commented Jul 31, 2020

@antoweb 0.113.3 isn't released yet, so that requires a bit of patience.

@antoweb
Copy link

antoweb commented Jul 31, 2020

@antoweb 0.113.3 isn't released yet, so that requires a bit of patience.

Sorry from hmmbob I understood that her had tried

@damiano75
Copy link

Same here
HA 0.113.2 HassOS 4.11;
And its not only the spaces but also german "umlauts" (ä, ö, ü, ß) !

AHAH very nice. In Italian language replace spaces with dash (-) is a working solution for now

yes, but try with "è" ...

@rpitera
Copy link

rpitera commented Jul 31, 2020

Thanks @frenck for resolving this so quickly. Though it hasn't affected normal HA operations, this has been an annoying bug nonetheless! LOL
It was entertaining though; I had an automation that announced the nightly forecast and tomorrow's forecast at sunset. It sounded like my Nest Home Hub was having a stroke.

@hmmbob
Copy link
Contributor

hmmbob commented Jul 31, 2020

@antoweb 0.113.3 isn't released yet, so that requires a bit of patience.

Sorry from hmmbob I understood that he had tried

I did partly - I pinned the yarl package to 1.4.2 and that worked.

@hmmbob
Copy link
Contributor

hmmbob commented Aug 1, 2020

Confirming that 0.113.3 fixed the issue for me.

@tubalainen
Copy link
Contributor

Yep! Can confirm working (Swedish) with .3!

@cvb941
Copy link

cvb941 commented Aug 1, 2020

0.113.3 fixed most of the issue.

However, using the Slovak (sk) language, typing práčka into the Text to speak window of the media Media Control Card results in percentages.

Interestingly, typing Práčka with capital P works just fine.

@sotima
Copy link

sotima commented Aug 1, 2020

0.113.3 fixed most of the issue.

However, using the Slovak (sk) language, typing práčka into the Text to speak window of the media Media Control Card results in percentages.

Interestingly, typing Práčka with capital P works just fine.

Probably coming from your tts cache?! You should clear the cache (/config/tts/)

@sotima
Copy link

sotima commented Aug 1, 2020

..still waiting for the update to show up in supervisor ....

@rpitera
Copy link

rpitera commented Aug 1, 2020

@sotima - Reload supervisor and you'll see it.

@sotima
Copy link

sotima commented Aug 1, 2020

@rpitera: thank you showed up immediately aftter writing my post!

@sotima
Copy link

sotima commented Aug 1, 2020

Confirmed: German umlauts also work again. My wife is pleased! ;-)

@antoweb
Copy link

antoweb commented Aug 1, 2020

Confirm Italian language work again also with spaces

@antoweb
Copy link

antoweb commented Aug 1, 2020

Confirmed: German umlauts also work again. My wife is pleased! ;-)

Lol

@MechEng70
Copy link

Thank you. Wife is happy too!!!

@xbmcnut
Copy link

xbmcnut commented Sep 10, 2020

This issue has reemerged for me in the last 24hrs under 0.114.4 and supervisor 242. It's been fine under 114.4 for weeks only the supervisor has been updating and now when I restart Home Assistant, I get a long screed of '%' messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.