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

2024.10.0 breaks text to speech #127518

Closed
vhillaire opened this issue Oct 4, 2024 · 49 comments · Fixed by #127680
Closed

2024.10.0 breaks text to speech #127518

vhillaire opened this issue Oct 4, 2024 · 49 comments · Fixed by #127680
Assignees

Comments

@vhillaire
Copy link

The problem

After upgrading all automations with tts stop speaking

What version of Home Assistant Core has the issue?

2024.10.0

What was the last working version of Home Assistant Core?

2024.9.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

I'm sure I'm not the only one experiencing this issue.

@Mats7891
Copy link

Mats7891 commented Oct 4, 2024

Are you running Google Cast? You probably need to provide more information. There is a thread here with people experiencing similar issues:
https://community.home-assistant.io/t/google-cast-error/778156

I see similar issue with the following in the logs:
Error while executing automation automation.aa_prov_2: CastMediaPlayerEntity._quick_play Failed: Failed to execute quick play http://192.168.0.128:8123/api/tts_proxy/0e26165...0d69_sv-se_6e8b81ac47_cloud.mp3.

Not every time, works 50% of the times, compared to 100% before

@korttoma
Copy link

korttoma commented Oct 4, 2024

me and a bunch of others are using tts.google_cloud_say and it is broken since 2024.10.0, allso microsoft_tts seems to be broken. There are several comments about this issue in this thread -> https://community.home-assistant.io/t/2024-10-heading-in-the-right-direction/777864

Logger: homeassistant.components.tts
Source: components/tts/init.py:1080
integration: Text-to-speech (TTS) (documentation, issues)
First occurred: 07:59:19 (1 occurrences)
Last logged: 07:59:19

Error on load tts: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_en-us_xxxdedxxxe_google_cloud not in cache!

@PhilippeP62
Copy link

#127370

@henrikbla
Copy link

Can confirm for both Google Cloud TTS and Microsoft TTS. Error messages are not very descriptive, let me know if I can provide any additional data.

Error on load tts: 04b3d12595b23216e9056c4dbd6edb0e73edb2bb_en-us_ba229ed5ca_microsoft not in cache!
Error on load tts: bb4387ee9ec0351512462bdf8438a2a27ee11d56_en-us_b346d6efd1_google_cloud not in cache!

TTS does work when using Piper though.

@Vabis1010
Copy link

a Tiny solution:
placing a100 milli second delay in your automation before the ttsaction wil solve your problemfor now. Not happy about it but it works a bit.

@henrikbla
Copy link

a Tiny solution: placing a100 milli second delay in your automation before the ttsaction wil solve your problemfor now. Not happy about it but it works a bit.

Interesting, thanks for this. My use case is the Voice Assistant from phone though, I don't think it is possible to set a delay there.

@Vabis1010
Copy link

Vabis1010 commented Oct 4, 2024 via email

@sammyh2506

This comment was marked as duplicate.

@josvic001

This comment was marked as duplicate.

@Ngiri67

This comment was marked as off-topic.

@ghost

This comment was marked as duplicate.

@ArunGupta2017

This comment was marked as duplicate.

@ghost

This comment was marked as off-topic.

@michaelarnauts

This comment was marked as off-topic.

@joostlek

This comment was marked as off-topic.

@henrikbla

This comment was marked as off-topic.

@joostlek

This comment was marked as off-topic.

@antoweb

This comment was marked as duplicate.

@henrikbla
Copy link

Can confirm this is still present in 2024.10.1, so not related to the Chromecast change which was indeed reverted in .1.

@nelsonamen

This comment was marked as off-topic.

@adorobis
Copy link

adorobis commented Oct 4, 2024

Not sure what Chromecast casting would have anything to do with this, unless there's some weird dependecy hidden behind.

Well. looking at the error message mentioned above here (I've had the same) it has everything to do with casting to chromecast devices. Error while executing automation automation.aa_prov_2: CastMediaPlayerEntity._quick_play Failed: Failed to execute quick play http://192.168.0.128:8123/api/tts_proxy/0e26165...0d69_sv-se_6e8b81ac47_cloud.mp3..

There are 2 TTS issues going on after 2024.10 :)

What would be the other issue? Would be good to provide some error message/log entry for it.
And btw, 2024.10.1 fixes it for me as well.

@henrikbla
Copy link

There are 2 TTS issues going on after 2024.10 :)

What would be the other issue? Would be good to provide some error message/log entry for it.

And btw, 2024.10.1 fixes it for me as well.

The other issue is, Google Cloud TTS and Microsoft TTS stopped working after 2024.10.0.

I don't even have a Chromecast right now active. The error is repeated for example when using Voice Assist through browser, mobile app etc.

These are the log entries, as listed above as well.

Error on load tts: 04b3d12595b23216e9056c4dbd6edb0e73edb2bb_en-us_ba229ed5ca_microsoft not in cache!
Error on load tts: bb4387ee9ec0351512462bdf8438a2a27ee11d56_en-us_b346d6efd1_google_cloud not in cache!

@ghost

This comment was marked as off-topic.

@Ngiri67

This comment was marked as off-topic.

@Tekwyzard
Copy link

There are 2 TTS issues going on after 2024.10 :)

What would be the other issue? Would be good to provide some error message/log entry for it.
And btw, 2024.10.1 fixes it for me as well.

The other issue is, Google Cloud TTS and Microsoft TTS stopped working after 2024.10.0.

I don't even have a Chromecast right now active. The error is repeated for example when using Voice Assist through browser, mobile app etc.

These are the log entries, as listed above as well.

Error on load tts: 04b3d12595b23216e9056c4dbd6edb0e73edb2bb_en-us_ba229ed5ca_microsoft not in cache! Error on load tts: bb4387ee9ec0351512462bdf8438a2a27ee11d56_en-us_b346d6efd1_google_cloud not in cache!

Yeah, I don't have a Chromecast either, only a dumb speaker connected to an old Raspberry Pi running 'PiCorePlayer' and 'Logitech Media Server', and because I've had so many issues historically with Google Cloud TTS, it's now always the first thing I check on an update. I didn't have 2024.10.0 on my system long enough (less than than 10 minutes) to do any real troubleshooting, I didn't even try and get log entries, sorry, but other peoples errors regarding the required speech data 'not being in cache' seem to tally with my system only being able to say something that had previously been cached.
Unless #127555 fixes the non-chromecast related issue too, which from some comments above, it doesn't, I'll be staying on 2024.9.3, and probably going back to waiting till closer to the end of the month for more .0 and .1 bugs to be squished.

@joostlek

This comment was marked as off-topic.

@Ngiri67

This comment was marked as off-topic.

@ghost

This comment was marked as off-topic.

@ghost

This comment was marked as off-topic.

@joostlek

This comment was marked as off-topic.

@ghost

This comment was marked as off-topic.

@joostlek

This comment was marked as off-topic.

@ghost

This comment was marked as off-topic.

@joostlek

This comment was marked as off-topic.

@ghost

This comment was marked as off-topic.

@Petro31

This comment was marked as off-topic.

@ghost

This comment was marked as off-topic.

@Petro31

This comment was marked as off-topic.

@ghost

This comment was marked as off-topic.

@joostlek

This comment was marked as off-topic.

@ghost

This comment was marked as off-topic.

@joostlek

This comment was marked as off-topic.

@Mats7891

This comment was marked as off-topic.

@ghost

This comment was marked as off-topic.

@Prior99

This comment was marked as off-topic.

@ghost

This comment was marked as off-topic.

@Tekwyzard
Copy link

Tekwyzard commented Oct 5, 2024

I couldn't resist trying 2024.10.1, I'm just far too curious for my own good, but I put a bit more effort into it this time, yeah, it doesn't fix the google cloud tts caching problem, even calling it as a service (action, whatever) from developer tools, explicitly asking it to cache the data doesn't make any speech burst forth from my Pi powered crappy vintage speaker.
I was a good boy this time and got my own log entry, not that it adds much to solving the mystery.

I did observe that when it failed, when trying from the tts option in the media side menu thing, that it got stuck, no playback progress bar, and the play button just sat there taunting me, on 2024.9.3 doing the same, I get progress bar movement to completion, while the play button briefly changes to pause, then back again. I dunno if that helps anyone.

Logger: homeassistant.components.tts
Source: components/tts/init.py:1080
integration: Text-to-speech (TTS) (documentation, issues)
First occurred: 15:19:54 (1 occurrences)
Last logged: 15:19:54

Error on load tts: 983dcfe8ec989cc7931f957de53b97551580904e_en-au_e3d339f6a3_google_cloud not in cache!

@rikroe
Copy link
Contributor

rikroe commented Oct 5, 2024

At least for Google TTS, the culprit is #125220.
With this PR, option strings (e.g. encoding "MP3") are passed to texttospeech.AudioConfig, but it should be texttospeech.AudioEncoding.MP3.
With this PR, the enum lookup does not work as it now looks up by value instead of by name.

More details from debug console

Old implementation

> texttospeech.AudioEncoding[options[CONF_ENCODING]]
<AudioEncoding.MP3: 2>

Implemented in PR

> texttospeech.AudioEncoding(options[CONF_ENCODING])
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.12/enum.py", line 757, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/enum.py", line 1171, in __new__
    raise ve_exc
ValueError: 'MP3' is not a valid AudioEncoding

@joostlek
Copy link
Member

joostlek commented Oct 5, 2024

cc @cdce8p

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

Successfully merging a pull request may close this issue.