intents icon indicating copy to clipboard operation
intents copied to clipboard

[RU] Assistant doesn't pronounce "minus" in response when the temperature is negative

Open dimmer123 opened this issue 1 year ago • 10 comments

Assistant doesn't pronounce "minus" in response in russian when the temperature is negative. In english it pronounces right with "minus".

dimmer123 avatar Nov 28 '23 13:11 dimmer123

That's probably an issue with your TTS engine. Have you tried any other TTS?

tetele avatar Nov 29 '23 08:11 tetele

Encountered the same issue for Romanian, fixed it like this https://github.com/home-assistant/intents/pull/1706

cc @HepoH3

tetele avatar Dec 04 '23 21:12 tetele

Encountered the same issue for Romanian, fixed it like this #1706

cc @HepoH3

Thank you for tagging me in! I'll check it out this week.

HepoH3 avatar Dec 05 '23 07:12 HepoH3

Although I'm not Russian, I struggle with this too...

None of my TTS systems read out loud when there is a "-" sign... in fact, they also fail to recognize decimal points in such cases.

That is, instead of saying "minus one point two" for -1.2, it says "one two."

I tried with a dot (.) and a comma (,) and a space before the "-" (- 1.2) but none of these work.

This would solve the problem:

{% set temp = state.attributes.get('temperature') %}
{% if temp is number and temp < 0 %}
  {% set temp = "mínusz " ~ temp|string|replace("-", "") %}
{% endif %}
{{ temp }} {{ state.attributes.get('temperature_unit') }} {{ weather_condition.get((state.attributes.get('untranslated_state') | string).lower(), "") }}

but it's not very elegant :) What do you think?

v1k70rk4 avatar Jan 21 '24 14:01 v1k70rk4

Same issue with French, using Piper TTS (latest version as of 2024-02-09).

joel-bourquard avatar Feb 09 '24 08:02 joel-bourquard

@joel-bourquard @HepoH3 the solution below has been successfully tested and works well. It addresses the issue with negative numbers, the decimal comma issue, and even the weather status is functioning. https://github.com/home-assistant/intents/pull/2038

v1k70rk4 avatar Mar 05 '24 14:03 v1k70rk4

Hi @v1k70rk4 , thanks for the good news! If I understand right, the change has been merged but it only covers the Hungarian language?

joel-bourquard avatar Mar 05 '24 16:03 joel-bourquard

@joel-bourquard Well, unfortunately, this varies by country, who uses '.' or ',' and how they say the minus sign, so yes, this has to be done country by country. But there are languages where this is not a problem for the TTS.

Unfortunately, Hungarian is such a language :) not only is our grammar extremely complicated, but the TTS software is also very sensitive :)

v1k70rk4 avatar Mar 05 '24 16:03 v1k70rk4

@v1k70rk4, thank you very much!

HepoH3 avatar Mar 09 '24 23:03 HepoH3

@dimmer123, could you check if the problem is resolved?

HepoH3 avatar Mar 15 '24 08:03 HepoH3