intents
intents copied to clipboard
[RU] Assistant doesn't pronounce "minus" in response when the temperature is negative
Assistant doesn't pronounce "minus" in response in russian when the temperature is negative. In english it pronounces right with "minus".
That's probably an issue with your TTS engine. Have you tried any other TTS?
Encountered the same issue for Romanian, fixed it like this https://github.com/home-assistant/intents/pull/1706
cc @HepoH3
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.
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?
Same issue with French, using Piper TTS (latest version as of 2024-02-09).
@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
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 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, thank you very much!
@dimmer123, could you check if the problem is resolved?