Hello
i’m trying to make this work using tts.piper and a custom voice.
this is working (untill i try the non-working one bellow)
service: chime_tts.say
target:
entity_id:
- media_player.sonos_bureau
data:
chime_path: /media/chimes/TGP - Janet Bing - edit.mp3
final_delay: 0
tts_playback_speed: 100
volume_level: 0.5
tts_platform: tts.piper
message: Alert paidjerduty !
this is working too
service: tts.speak
target:
entity_id:
- tts.piper
data:
cache: false
media_player_entity_id: media_player.sonos_bureau
message: Alert paidjerduty !
options:
voice: glados
this does not work
service: chime_tts.say
target:
entity_id:
- media_player.sonos_bureau
data:
chime_path: /media/chimes/TGP - Janet Bing - edit.mp3
final_delay: 0
tts_playback_speed: 100
volume_level: 0.5
tts_platform: tts.piper
message: Alert paidjerduty !
options:
voice: glados
also a variation i did just in case
options:
options:
voice: glados
i can see this error in logs
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 704, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/__init__.py", line 111, in async_say
result = await start_queue(service, hass, async_say_execute)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/__init__.py", line 389, in start_queue
result = await asyncio.wait_for(task, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
return fut.result()
^^^^^^^^^^^^
File "/config/custom_components/chime_tts/__init__.py", line 126, in async_say_execute
options = parse_options_yaml(service.data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/__init__.py", line 1220, in parse_options_yaml
options = yaml.safe_load(options_string)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yaml/__init__.py", line 125, in safe_load
return load(stream, SafeLoader)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yaml/__init__.py", line 79, in load
loader = Loader(stream)
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yaml/loader.py", line 34, in __init__
Reader.__init__(self, stream)
File "/usr/local/lib/python3.11/site-packages/yaml/reader.py", line 85, in __init__
self.determine_encoding()
File "/usr/local/lib/python3.11/site-packages/yaml/reader.py", line 124, in determine_encoding
self.update_raw()
File "/usr/local/lib/python3.11/site-packages/yaml/reader.py", line 178, in update_raw
data = self.stream.read(size)
^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'read'
Any consecutive calls to chime_tts.say that was working before does not work, untill i restart the integration.
Service call #5 was added to the queue.
...waiting for 2 previous queued jobs to complete.
Unable to get next queued service call.
Timeout reached on queued job #1.
Timeout reached on queued job #2.
even after waiting for a bit and hopefully all the job reaching their timeout, i still have to restart the integration for first script to work again.
direct call to tts.speak
keeps working
am i missing something ?
thanks !