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

TTS (google) pronouncing date incorrectly #40925

Closed
Mariusthvdb opened this issue Oct 1, 2020 · 18 comments
Closed

TTS (google) pronouncing date incorrectly #40925

Mariusthvdb opened this issue Oct 1, 2020 · 18 comments

Comments

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Oct 1, 2020

The problem

TTS started acting up again, on pronouncing date/time templates. Instead of saying the date, it starts 'spelling' the numbers and month name like "nul one O C T" instead of the desired 1 oktober (in dutch)

Environment

  • Home Assistant Core release with the issue: 115.5
  • Last working Home Assistant Core release (if known): not sure, but think 115.4
  • Operating environment (OS/Container/Supervised/Core): OS
  • Integration causing this issue: TTS Google
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/google_translate/

Problem-relevant configuration.yaml

 {{as_timestamp(now())|timestamp_custom('%d %b %X')}}

Traceback/Error logs

Additional information

templates show fine in the developer editor, and in template sensors in the front end.
Odd thing is, even when adding the %-d to have it read 1 October instead of 01 October, it still pronounces the 'nul', in

          message_nl: >
            Goede{{states('sensor.dag_deel')}}, Home-assistant Rpi4 is weer actief sinds
            {{as_timestamp(now())|timestamp_custom('%-d %b %X')}} en buiten is het
            {{states('sensor.temp_current')}} graden.

NM the last remark, forgot I had to reload scripts, and not templates. sorry. the original issue stands.

@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)

@Mariusthvdb
Copy link
Contributor Author

Mariusthvdb commented Oct 5, 2020

dear dev team, has anyone seen this? I've noticed a few other TTS PR's getting merged but they don't seem related? Also letting you know this still happens on 155.6

@frenck
Copy link
Member

frenck commented Oct 5, 2020

Your issue is 4 days old. Have some patience.

@Mariusthvdb
Copy link
Contributor Author

sure!
I apologize if this came over like pushing. Was merely trying to be as precise as I could be in describing the breaking issue.

It's not that our lives depend on it, I'll hold ;-)
thanks!

@Mariusthvdb
Copy link
Contributor Author

Mariusthvdb commented Oct 8, 2020

only updating this is still the case in 116, and confirm the recent updates to Tts mentioned earlier didn't relate to this issue.

update

and on 116.2, just for reference.
hope someone will check this

@hmmbob
Copy link
Contributor

hmmbob commented Nov 9, 2020

Works fine here, both with {{as_timestamp(now())|timestamp_custom('%d %b %X')}} as well as {{as_timestamp(now())|timestamp_custom('%d %B %X')}} and Dutch language.

By the way, this is not something HA can fix, as the processing is done at Google side. You just upload the text/string, and Google passes back an audio file. So, if it isn't working as expected then try modifying the string you launch towards google (like I did in the example above with changing %b to %B)

@Mariusthvdb
Copy link
Contributor Author

yes, had done as you said, changed the string to get what I want (mainly the %d to %-d and %b to %B), bur reverting to the original string {{as_timestamp(now())|timestamp_custom('%d %b %X')}} seems to be back working correctly on 117.4 now.

do get a lot of No TTS from google_translate errors, but that might be another issue:
Schermafbeelding 2020-11-10 om 10 52 27

closing if that is concluded to be the case @frenck?

@hmmbob
Copy link
Contributor

hmmbob commented Nov 10, 2020

Could be #42911 that is fixed by #43015. Should be in next release 0.118.

@Mariusthvdb
Copy link
Contributor Author

not sure, I opened that #42255 but haven't seen it for some time now,. Still, great it has been recognized and mitigated indeed.

@hmmbob
Copy link
Contributor

hmmbob commented Nov 11, 2020

Oh, it was already picked up for 0.117.6 - you can try that (being released right now)

@edif30
Copy link
Contributor

edif30 commented Nov 12, 2020

No clue why HA closed #42911. The 1.1.4 release of gTTs-token was proven to NOT fix these issues. @frenck Ideas?

@hmmbob
Copy link
Contributor

hmmbob commented Dec 3, 2020

The logic of the Google Translate integration has changed for the next release (0.119 / 1.0.0, scheduled 13 Dec). Please keep an eye on that release an report back if the issue still arises.

See #43863

@Mariusthvdb
Copy link
Contributor Author

ok, will do. keep this one open until then? or close and create a new issue if and when.

@hmmbob
Copy link
Contributor

hmmbob commented Dec 3, 2020

I'd keep it open until you verified if it is solved. That being said - you are running it already as custom_component, right? If so, you can already verify and see if the issue is still there. If not, you can close :)

@Mariusthvdb
Copy link
Contributor Author

Mariusthvdb commented Dec 3, 2020

ok, let me run it for a full day and see what happens. For now it is speaking perfectly, even auto skips the leading zero again if I use

  - service: script.intercom_message
    data:
      message_en: >
        Good {{states('sensor.part_of_day')}}, Home-assistant Rpi4 is back up and running since
        {{as_timestamp(now())|timestamp_custom('%d %B %X')}} and it is
        {{states('sensor.temp_current')}} degrees.
      message_nl: >
        Goede{{states('sensor.dag_deel')}}, Home-assistant Rpi4 is weer actief sinds
        {{as_timestamp(now())|timestamp_custom('%d %b %X')}} en buiten is het
        {{states('sensor.temp_current')}} graden.

Also output in English is back to 'the 3d of december', so all is well for now again!

German does still pronounce the leading zero, as does French and Italian ;-) might be local custom though, I am not sure of that of course.

@Mariusthvdb
Copy link
Contributor Author

so this is still an issue, but in a different sort of way. Dutch sentences use the dutch words for Uren, minutes and seconden, but the Month and Day names are still in English.... Or again, I am not really sure tbh.

Ive created a dedicated issue for that: #47220 since I believed this thread to have been closed. sorry for that.

@hmmbob
Copy link
Contributor

hmmbob commented Mar 3, 2021

Then please close this one.

@github-actions
Copy link

github-actions bot commented Jun 1, 2021

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 1, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jul 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants