I’m trying to get announcements working properly on my setup, but I’ve hit a roadblock. Using the media_player.play_media action to send the announcement, I need to know what media-source applies to the Google Cloud TTS integration. I’ve seen people use “amazon_polly” for Alexa, but I can’t find any examples for the Google Cloud service. I tried the below, but get the following error:
“Failed to perform the action media_player.play_media. Provider google_cloud not found”
If I change it to “cloud” instead of “google_cloud” the action will run, but fail to make the announcement because I don’t use the Nabu Casa cloud.
action: media_player.play_media
target:
entity_id: media_player.satellite_speaker
data:
announce: true
media_content_id: media-source://tts/google_cloud?message={{ "Testing Voice" }}
media_content_type: music
p.s. I want to use media_player.play_media because that allows me to set the volume for the announcement as opposed to other actions.
I’m not sure you can use media_player.play_media
with Google Cloud TTS - it has to be tts.speak
, which doesn’t allow you to set volume.
I haven’t tested this, but my impression is that tts.speak inherits its volume from the last setting, so you may be able to use media_player.set_volume
first.
See that’s what I’m stuck on. from what I can tell, the media_player.play_media announce function uses an api call to run the tts engine to generate the tts audio file, then just plays that file with play_media.
So it’s not that Google Cloud is being used with the media_player.play_media action, similar to how the Amazon tts or NabuCasa tts aren’t using the playe_media action. And I know it works with those two.
So, if the nabu casa engine is “cloud” and the amazon engine is “amazon_polly” then I’m assuming there is an engine for Google Cloud too.
But of course I could be wrong.
Figured it out (painfully).
media-source://tts/tts.google_cloud?message=“{{ ‘testing another sound’ }}”
That’s the format. Unfortunately, I’m still trying to control volume unsuccessfully. I’ll start a new topic for that