Can't get tts.cloud_say (Nabu Casa) to work with Chromecast - connects but no speech

Hi All,

I’m struggling with cloud TTS and Chromecast (which are my audio players).

When I call the tts.cloud_say service, or use the ‘Try’ facility in the cloud settings page, the Chromecast indicates that something has connected to it, but no sound plays. If I play other media - e.g. from Plex - to the same Chromecast, it works fine.

This is with NabuCasa, which is online and looks happy enough. Access to HA locally is plain HTTP.

The HA log shows this each time I try to play TTS to one of the CCasts:

2023-03-21 16:19:30.714 WARNING (SyncWorker_4) [pychromecast.controllers] Quick Play failed for http://192.168.8.201:8123/api/tts_proxy/eb061921ad8f0762e9ebd768dc81b601e948a076_en-gb_a9c18110b0_cloud.mp3:audio/mpeg({})
2023-03-21 16:19:30.717 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall media_player.play_media (c:01GW2FFJG2PMEQCTYNJXHZC3AF): entity_id=['media_player.study_chromecast'], announce=True, extra=, media_type=music, media_id=media-source://tts/cloud?message=Hello+doggo>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1826, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1845, 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 686, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 726, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 750, in async_play_media
    await self.hass.async_add_executor_job(
  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/pychromecast/quick_play.py", line 77, in quick_play
    controller.quick_play(**data)
  File "/usr/local/lib/python3.10/site-packages/pychromecast/controllers/media.py", line 547, in quick_play
    raise PyChromecastError()
pychromecast.error.PyChromecastError

Can anyone tell from that, what’s going wrong?

All the references I could find to cloud TTS failing, related to not having default_config loaded; mine is - this is a pretty new installation and mostly vanilla.

Thanks!

  • Any attempt to play a radio station via HA to a Chromecast also fails, with a message about ensuring the URL is reachable. The URL checks out fine; it’s not the problem.
  • Plex (my local server), can cast to the Chromecasts just fine.
  • Trying to cast a local video stream (IP camera) to a Chromecast, fails.

I’m stuck!