[APP][Pro] Google Services - App for Translate and new Text-to-Speech for any device with url input

Then you need to use the other Sonos Card, not the URL one buth Play Audio Track.
That one the made so it doesn’t repeat.

Did the volume gain solved your issue?

Hi, I read that further up in the blog, however Im not able to do that, as my Sonos speaker in the hallway (where I need the sound) is a Play5, a S1 device. This old speaker do not have the Play Audio Track card, only the URL card.

However not a very big problem. I just put in a “pause” to the speaker after app 10 sek, depending a on the length of the text. Put this into the "flow that initiate the “say”, so the other flow can be the same for all sounds.

You could use the Sonos Say App from the Community Store (App) : I fixed that one, added an extra card to make it work perfectly with this app.
Sonos Say | Homey Community Store

Yes, I checked all the requirements in the solution, added the payment subscription and then the connection worked as advertised. I could also see al the voices.

I mean the Volume Gain I build into the devicesettings to increase the volume of the generated audio, you requested that, right?

Hey Rwin, I have added a Volume Gain which you can set in device settings.

I have been trying to get the google services app running… everything seems working but no sound. even checked if the url with mp3 was working. it does play back from my browser, i tried to use the sonos play audio clip. no error but no sound, i tried play url, that give an error about “stream url has an unsupported scheme” the url that works in my browser is http://192.168.1.116:47333/tts/d6d1fb25-ca51-4209-852f-484891053cec.mp3 what can i check to get it to sound? I have stored the url in an variable to be able to retry.

When i save the JSON text and project name , en reload it, all of the information is gone
Also i can’t select a Google Cloud default voice

i do not understand

Hi Erwin, I got the same problem today, after reinstalling my homey (for other reasons). I had to uninstall and reinstall the google services.

My google services was in a “pause” state, which would not end. Uninstall/Reinstall solved it. The pause state was vivible in the app overview by having a small puse sign on the right side.

Hi Arie, A more “usability” question, as I do not see a simple solution and you previous posts indicate you use this a lot

How do I easily control which of 4 different speakers to send the text to? I got the idea of enable/disable different flows to secure that only one speaker was picking up the sound. However is hard to control and make always goes as expected. Any ideas?

Hi,

Ill look at support later this week.

You can create 4 devices, and configure each own trigger.
And create one device for all speakers.

And I’m using HOOP for creating Methods which handle how output goes.

That’s smart. More devices with different names, easy. Thanks.

1 Like

In the background, if speech is the same for different devices, it will give the same URL.
So, the memory goes across the multiple devices you created.

A speech (URL) is saved to memory when all parameters (text, voice, language, pitch, volume, and profile) are the same, so if you configure each tts-device with a different Device Profile, it will retrieve different URL’s for all of them.

I’m running into a problem. I have set up google cloud. Accepted the billing, enabled the api, created the owner role and added a key to be able to download the json file.

Tried adding the json file in the settings section of the app (through the developer site) but after adding the json file the language stays empty. I can add a project name, but that doesn’t seem to help either.

After saving I cannot restart the app, it results in a timeout. After removing the json settings and saving, it starts again but without the json… so not working.

What could this be?

Ey Arie,

Very good job, improvements are really good! I’ve set the DB +2, this will equal the volume for the Google Nest Mini. I first solved it with setting the volume to a specific value before every message, setting the volume takes away this step and so, many cards, thanks!

Some future improvements to consider:

  • If Google makes it available, loose the cast notification sound before speech/sound is send to cast
  • As long as the cast notification can’t be disabled, it would be nice if you can add some sort of delay or trick in speech. Let’s say 0.5 seconds. Often when i let Homey speak through Google the speech and cast notification go simultaneously.
  • The Google Cloud default voice can be set, but it does not inherent in flow cards. Can you adjust the cards so that if you don’t pick a voice it will use the default voice? Every time i make a card i have to scroll/type to pick to voice (when saving a flow it requires a voice to be set). Maybe a suggestion to add an voice “default” in the list that automatically is selected. Used the wrong card, didn’t notice the other card.

With this app and the last improvements you made Homey’s voice has been completely disabled, thanks for the good work!!

Hey Rwin,

Assuming you have a trigger flow, which as trigger has the TTS device trigger, in which you have a action card to send the the URL to the google cast device; you could have added a set-volume card in that flow, send the URL to cast with a second delay and configure this extra second delay in the TTS device setting.
This would have saved setting the volume in each flow starting TTS speech.
Also, TTS device have a finished trigger which you can use to restore volume or groupings or whatever.

Then, what do you mean with a notification sound?
My Google Service, or better yet, Google Cloud TTS doesn’t have any notification sounds in it.
If you have that, its eather part of the ChromeCast app or of the Google cast device itself, I have no idea.
Perhaps ask the Chromecast App developer?
If the developer of chromecast can confirm its a cast-device property and cannot be resolved, i am willing to work on a delay, but currently, i don’t now how: i asume you triggering the Chromecast-send-url actioncard which triggeres the sound. Perhaps you could, in the trigger flow, send a url to the cast-device with a empty speech url or something like that. But i asume when you then send the real speech, you will get a second notification sound. So best contact the chromecast developer.

With regards to the default voice, you indeed can set it through the settings.
And there are condition/action cards in which you can pick a voice, but there are also cards in which you don’t pick a voice, that one uses the default voice:

Condition Cards
All but the last 3 cards use default voice
The red circles are the one you pick a voice.

Action Cards
The first 3 cards use default voice
The red circles are the one you pick a voice.

Note: If you use condition cards, it will wait for speech to finish (including delay in device setting), and you can use the Then part to restore settings or whatever :wink:

For a delay in speech after the notification sound, you could use SSML to achive this:

<speak><break time="0.5s"/><p><s>Here is some speech on you speaker</s></p></speak>

(p’s and s’s are not needed, the speak element is and is case-sensitive.)

image


See Speech Synthesis Markup Language (SSML) (google.com) for a list of specific Google Cloud TTS SSML options (on the right side).

image

How are you entering the setting/json? Through Homey App or developer.athom.com?

You said, enabled API, i assume the right API (there are possibly two needed, the TTS and Translate; Project name is only used for Translate).

I cannot simulate the issue.
Please try setting the json through developer.athom.com–>settings–>Google Services and let me know if this works (or if you tried that allready ofc).

The only reason to adjust volume is to make it the same level as default. Let say my cast device in the livingroom, replacing Homey voice, is set to 55% (perfect default value). The TTS however has lower volume. Setting it to 65% will give almost the same level, but after this it stayed at 65% for other use. So a card would have been needed to get it back to 55%. With the settings in your app no cards in (for me) normal situations are needed.

Notification sound is a Chromecast default thing. It should be adjust (when available) by the developer (Athom). For now there can be nothing done to this. I first thought the sound was added by the TTS function and was included in the soundfile.

I will take a look into SSML, but this will be extra work, adjusting card and every time add this when making new flows. Can’t you code an delay in settings? This is really helpful for the Google casting devices (notification and speech start together).