I have a script Announce that I call from others. Sometimes it works. Other times I get No TTS from google_cloud for …
What is wrong? It used to work all the time. Now I think if I pass in speakers, it fails.
alias: Announce
description: Play message on speakers
fields:
message:
name: Message
description: The message to play
selector:
text: null
speakers:
name: Speakers
description: Speakers to broadcast on
selector:
entity:
multiple: true
integration: cast
domain: media_player
sequence:
- if:
- condition: time
before: "21:00:00"
after: "10:00:00"
then:
- service: tts.google_cloud_say
target:
entity_id: |
{% if is_state('input_boolean.test_mode', 'on') %}
media_player.kids_room_speaker
{% else %}
{{ speakers }}
{% endif %}
data:
message: <speak><prosody volume="+80dB">"{{ message }}"</prosody></speak>
else:
- service: tts.google_cloud_say
target:
entity_id: |
{% if is_state('input_boolean.test_mode', 'on') %}
media_player.kids_room_speaker
{% else %}
{{ speakers }}
{% endif %}
data:
message: <speak><prosody volume="+50dB">"{{ message }}"</prosody></speak>
mode: queued
icon: mdi:bullhorn-variant
max: 10
It now only works when I pass in “all speakers”?
FPro
(Florian)
January 2, 2023, 10:28am
2
Have you looked into the traces?
Have you looked into the logs?
Have you tested the service call in the developer tools?
Trace says
Stopped because an error was encountered at January 2, 2023 at 9:30:00 PM (runtime: 0.50 seconds)
No TTS from google_cloud for
when it fails.
Not sure how to do the rest.
FPro
(Florian)
January 2, 2023, 1:14pm
4
Settings → System → Logs
Developer Tools → Services
Test it with something simple.
The logs say
Error executing script. Error for call_service at pos 1: No TTS from google_cloud for '<speak><prosody volume=
I don’t know how to call it with code.
I can make a script and click it, it says No TTS from google_cloud for
FPro
(Florian)
January 3, 2023, 11:56am
6
Try it with something simple like “Hello World” and one fixed media player entity.
Have you checked everything in the Cloud Console?
Go through the setup steps once more and look if everything is valid including your payment options (credit card).
Do you have other Google Cloud services set up and do they work?
Yessometimes it works, other times it breaks
Executed: January 4, 2023 at 11:07:06 PM
Result:
params:
domain: script
service: announce
service_data:
message: test
speakers:
- media_player.main_bedroom_speaker
target: {}
running_script: true
limit: null
child_id:
domain: script
item_id: announce
run_id: ade8169a29bfd9b56539ded01ab78281
traced
(script.test) turned on
Script: Announce
Announce (script.announce) started
(script.announce) turned on
Show 2 more items
Stopped because an error was encountered at January 4, 2023 at 11:07:07 PM (runtime: 0.31 seconds)
No TTS from google_cloud for '<speak><prosody volume="+50dB">"test"</prosody></speak>'
I’ll check the rest
Following Google Cloud Platform - Home Assistant
Updated billing. I only clicked in the Text-to-Speech section. I don’t have other Google Cloud
I will see if it fixes tmr.
Well, it’s still failing sometimes.
But here’s one that worked. Several speakers were passed in.
Pretty consistently I get one at around 8pm reminding kids to get ready for bed
but the one at 9pm to say actually go to bed fails 90% time
I have no idea what’s going on. I have followed every instruction I’ve found and everything is set up correctly. My automation that runs every night reminding kids to brush their teeth runs 99% of the time. My script that calls my announce script fails 100% of the time. The one that runs when the dishwasher has finished works. I don’t know how to call the script from the developer box.
I have 100 traces now. Half fail half work
There’s no pattern. The same TTS at same times each day, so the same msg work or not work.
This is rubbish. What can I do?
Did you figure this out? I had this consistently working for 8 months maybe and now it has stopped.
Nope it’s a POS. Exactly the same script runs, same msg, randomly works.
Use a diff TTS now.
I wrapped it in SSML and it worked example below. Its expecting a marked up language. Speech Synthesis Markup Language (SSML) | Cloud Text-to-Speech API | Google Cloud
<speak>Testing <break time='200ms'/><emphasis level='strong'> 1 2 3</emphasis></speak>