Google Text to speech (TTS) stopped working

Hi everyone, my Google TTS stopped working suddenly and I can´t figure out whats broken.

Setup:

  • Home Assistant Core as Docker Container (Home Assistant 2023.7.1, Frontend 20230705.1)
  • 2x Google Nest Mini

Test Configuration:

service: tts.google_say
data:
  cache: false
  entity_id: media_player.kuche
  message: Das ist ein Test
  language: de

Device status:

What´s happening:
I get the “Pling” noice from Google Nest, but no speech. Error messages in Log:

What have I tried:
Remove all devices, reinstall Services Google Assistant and Google Cast
Restarted all devices

Any idea, what´s broken here?

Logger: pychromecast.controllers
Source: /usr/local/lib/python3.11/site-packages/pychromecast/controllers/media.py:544
First occurred: 13:38:30 (1 occurrences)
Last logged: 13:38:30

Quick Play failed for http://172.17.0.3:8123/api/tts_proxy/baa76da175d3867ead8dff0d5c8ccd31125b8320_de_-_google_translate.mp3:audio/mpeg({})
Logger: homeassistant.helpers.script.websocket_api_script
Source: components/cast/media_player.py:730
First occurred: 13:38:30 (1 occurrences)
Last logged: 13:38:30

websocket_api script: Error executing script. Unexpected error for call_service at pos 1:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 703, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 665, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1957, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1997, in _execute_service
    return await cast(
           ^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tts/legacy.py", line 147, in async_say_handle
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1957, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1997, in _execute_service
    return await cast(
           ^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 845, in entity_service_call
    response_data = task.result()  # pop exception if have
                    ^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1192, in async_request_call
    return await coro
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 889, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 730, in async_play_media
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pychromecast/quick_play.py", line 78, in quick_play
    controller.quick_play(**data)
  File "/usr/local/lib/python3.11/site-packages/pychromecast/controllers/media.py", line 547, in quick_play
    raise PyChromecastError()  # pylint: disable=broad-exception-raised
    ^^^^^^^^^^^^^^^^^^^^^^^^^
pychromecast.error.PyChromecastError
Logger: homeassistant.components.websocket_api.http.connection
Source: components/cast/media_player.py:730
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 13:38:30 (1 occurrences)
Last logged: 13:38:30

[140351512602960] Error handling message: Unknown error (unknown_error) julian from 192.168.200.20 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 680, in handle_execute_script
    response = await script_obj.async_run(msg.get("variables"), context=context)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1569, in async_run
    return await asyncio.shield(run.async_run())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 420, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 470, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 493, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 703, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 665, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1957, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1997, in _execute_service
    return await cast(
           ^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tts/legacy.py", line 147, in async_say_handle
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1957, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1997, in _execute_service
    return await cast(
           ^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 845, in entity_service_call
    response_data = task.result()  # pop exception if have
                    ^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1192, in async_request_call
    return await coro
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 889, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 730, in async_play_media
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pychromecast/quick_play.py", line 78, in quick_play
    controller.quick_play(**data)
  File "/usr/local/lib/python3.11/site-packages/pychromecast/controllers/media.py", line 547, in quick_play
    raise PyChromecastError()  # pylint: disable=broad-exception-raised
    ^^^^^^^^^^^^^^^^^^^^^^^^^
pychromecast.error.PyChromecastError

push (10 chars)

Does the media_player.kuche custom player work?

You may want to read the 2023.7 release note

Look for the “integrations now available to set up from the UI”

Maybe the transfer from yaml to GUI integration did not go well. You may have to re-add the integration called " Google Translate text-to-speech" and set it up.

2 Likes

That´s it! I have removed the YAML-Configuration for google translate and added the following lines in my configuration.yaml:

homeassistant:
    time_zone: Europe/Berlin
    external_url: "https://hass.xyz.eu/"
    internal_url: "http://xyl"

After that, I reinstalled the cast- and translate integration and now it work´s with “Text-to-speech (TTS): Speak”.

Thanks!