WTH does Text to Speech no longer work for HomePods

The Home Assistant update that moved TTS away to media broke TTS on HomePods. It has never worked since and emits:

Failed to call service media_player/play_media. ('failed to init decoder', -17)

I don’t know what that means. I asked IRC, they don’t know either.

Not sure if you already checked, but issues are tracked on Gihub Issues · home-assistant/core · GitHub

You can search if there is already an issue covering this problem and if not you can create a new issue for it.

It just works. Go to the Dev tools > Services. Choose your TTS service, select your HomePod, type your message and hit “Call Service”. You’ll be surprised.

Failed to call service tts.picotts_say. Unknown error ← For a HomePod.
Green tickbox ← Any other device.

I am not surprised, this is the exact WTH I reported before.

Lowering the barrier means no redirections to GitHub.

This was broken and was subsequently fixed. My HomePod speaks a greeting every time I use my coffee machine (daily), so I know it’s working right now with 2022.9.x - I don’t know if it’s been broken again with 2022.10 however.

TTS to the HomePod is broken with 2022.10…

UPDATE: And I figured it out…I had the Apple TV Beta component installed through HACS a while ago and forgot about it. Once I removed that and reconfigured, things are working!

I skipped 2022.10, but it’s working with 2022.11 (same as it did with 2022.9 for me)

Sorry, I mean 2022.11 is not working.

UPDATE: And I figured it out…I had the Apple TV Beta component installed through HACS a while ago and forgot about it. Once I removed that and reconfigured, things are working!

For me, its working (2022.11) with Amazon Polly

And I figured it out…I had the Apple TV Beta component installed through HACS a while ago and forgot about it. Once I removed that and reconfigured, things are working!

Whatever is broken is specific to PicoTTS, the Nabu Casa cloud TTS does work against the HomePods.

Tried today, google_translate TTS works as intended, but picotts gets an error.
I prefer local TTS, Any solutions?

Running:
Home Assistant 2023.2.5
Supervisor 2023.01.1
Operating System 9.5

ERROR LOG:

Logger: homeassistant.helpers.script.websocket_api_script
Source: components/apple_tv/media_player.py:292
First occurred: 12:02:53 (1 occurrences)
Last logged: 12:02:53

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: (‘failed to init decoder’, -17)
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 451, in _async_step
await getattr(self, handler)()
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 684, in _async_call_service_step
await service_task
File “/usr/src/homeassistant/homeassistant/core.py”, line 1787, in async_call
task.result()
File “/usr/src/homeassistant/homeassistant/core.py”, line 1824, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File “/usr/src/homeassistant/homeassistant/components/tts/init.py”, line 217, in async_say_handle
await hass.services.async_call(
File “/usr/src/homeassistant/homeassistant/core.py”, line 1787, in async_call
task.result()
File “/usr/src/homeassistant/homeassistant/core.py”, line 1824, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 213, in handle_service
await service.entity_service_call(
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 680, in entity_service_call
future.result() # pop exception if have
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 968, in async_request_call
await coro
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 720, in _handle_entity_call
await result
File “/usr/src/homeassistant/homeassistant/components/apple_tv/media_player.py”, line 292, in async_play_media
await self.atv.stream.stream_file(media_id)
File “/usr/local/lib/python3.10/site-packages/pyatv/core/facade.py”, line 392, in stream_file
await self.relay(“stream_file”)(file, **kwargs)
File “/usr/local/lib/python3.10/site-packages/pyatv/protocols/raop/init.py”, line 371, in stream_file
audio_file = await open_source(
File “/usr/local/lib/python3.10/site-packages/pyatv/protocols/raop/audio_source.py”, line 483, in open_source
return await InternetSource.open(source, sample_rate, channels, sample_size)
File “/usr/local/lib/python3.10/site-packages/pyatv/protocols/raop/audio_source.py”, line 362, in open
stream_generator = await loop.run_in_executor(
File “/usr/local/lib/python3.10/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.10/site-packages/miniaudio.py”, line 1265, in stream_any
raise DecodeError(“failed to init decoder”, result)
miniaudio.DecodeError: (‘failed to init decoder’, -17)

I have a “issue Post” created on HomeAssistan Github:

Lets hope for a solution

Did this ever get fixed? I can use Google Translate TTS and Cloud TTS but get an error on both PicoTTS and Speak TTS.

This is so frustrating. I used Amazon Polly TTS with my HomePod for over a year without any issue and about 6 months ago it just stopped working. Still no fix - very disappointing. Now I have to call service at least twice (first time errors) to get it to say anything rendering it unusuable in automations. Does anyone have a workaround?

I bought a couple of echos to do announcements. I like my homepods and appleTV, but I doubt Apple will ever satisfactorily open up their devices.

The echoes are high quality. If Amazon wants to sell these devices at below cost I will take them.

Ecobee thermostats are nice because they can be configured for either Alexa or Siri. I’m currently running Alexa after Siri was disappointing. But if Siri ever becomes more useful I will switch back. HA TTS and STT abstraction is great because switching between systems, or mixing systems, isn’t a bid deal.

How are the echos in terms of sound quality for announcements? I know the homepod wins out when playing content but how noticable is it during announcements? I’ve been holding off going this route but I might just have to at this point lol

Sound quality is good compared to my homepod minis. I see Amazon just released the Echo Pop, which is interesting.

The only sound quality issue I have is with Piper voices with any speaker. TTS to Notifications: Alexa media sounds great everywhere.

For some reason this happened to me also, but only in automations, I was able to call script from developer tools with the same content.
Finally the solution was to change a text a little bit in the TTS message.

Not quite sure what is happened behind the scenes…