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

Indeed, the voices are much better, especially the Wavenet voices. And I’m using NL_MALE_C wavenet atm, and it is very nice.
Also, being able to write SSML makes it much more realistic, for example, when writing paragraphs with sentences like
<p><s>hello</s><s>I hope you are doing fine today</s><s>see you later</s></p>,
The pauses between those sentences are variable, much more intuitive than putting breaks of 0.5 or 1 seconds after each sentence. And a million characters a month is quite a lot I reckon.
But I am indeed planning on improving and making stuff settable that wil reduce google requests overal, make the memory usage smarter to save those precious monthly characters :wink:

How far away are you from getting the audio to play on Homey itself? :slight_smile:

So I am for one very interested in this application. Hope the app will be available soon

I already have the functionality ready in another app, but I wanna make it smart, so it won’t kill homey’s bandwidth or anything.
And I’m waiting for the publish to go through, then I’ll work on adding the homey as output setting in.

Same here, just waiting for approval :slight_smile:

1 Like

As soon as this comes online you can play it on homey :slight_smile:

Music Url Converter - Play Music URL’s on Homey bigger then 900 KB - Apps - Homey Community Forum (athom.com)

1 Like

Now included: Google Translate

Great!!!Some news when the app will be ready for public download?Thanks

Its live now!

The app is installed.
The Json file is correct
I have select a voice.

I dont understand how i can do something simple as sending the text Dinner is Ready to a Google Chromecast speaker. Do you have a flow example voor me?

Does the Chromecast App have a ActionCard for sending a URL to the device?
If so:

  1. Create a Google TTS Cloud Device
  2. Create a flow with a trigger Url Triggered from the Google TTS Device, and have that flow send the token Url from that trigger (within the flow) to the Chromecast device.
  3. Create a flow to speak, using a conditioncard (an And card) or a actioncard (a Then card) to start speech for that Google TTS Device.

Step 1
Create a Google TTS Cloud Device.
I call it TTS Sonos 1 in this example.

Step 2
Setup a trigger for the TTS Device with a actioncard that send the Url token to the device you want to hear to voice on.
image

Step 3
Start a speech condition/action (And or Then part) with a text (and it wil trigger the flow from step 2).
image

1 Like

Hi Arie,
sorry, but I don’t understand how to manage the second flow.
I have the problem that TTS keeps repeating itself. Also it takes about 3-4 seconds for the voice output to start.
To understand it better, would you also please post the second flow completely.

Btw, do I have to activate the OAuth-Consent Screen? I only have rights for the user type “External”, is that ok?

Hey,

I updated the example i gave above (and the topic main text also) to better show the flows.

If you are using the Athom Sonos App, use Play Audio Clip. This is the new improved version of Send URL, and it works much faster.

In the device settings you can finetune the delay, with Sonos App (URL) you need about 4sec indeed, but with play Audio Clip its about 1 sec or 1.5 seconds. (Default setting is 1000ms).
This delay is included in the time to trigger the Url Finished Trigger Card which can be used to turn the Sonos device back to previous state.

No you don’t need a OAuth-Consent Screen, just a Service Account JSON, with viewing rights to the api’s you use (Text-To-Speech and perhaps Translate). But easier is it to make the Service Account projectmanager like in the Google Setup example given above. Then you don’t need to worry about further rights every time, only enable the right API’s.

Since the Google Cloud Services used (right now) are not linked to a person there is no need (or ability) to connect it to a OAuth (which is used to connect a service including/requesting a specific user). OAuth would be required for youtube searches (linked to you search account) or Speech-To-Text (used to better understand the specific user that is going to be talking).

If you have another quistion i’ll be glad to help.
Let me know if you get it working or not.

1 Like

Thx for all the help.
But still i can not get speech working on a Chromecast Speaker. (google home max, or mini)
I hear the sound that the speaker is triggerd. But no sound.

I hope that some can help me.

unfortunately I don’t have a Chromecast device.
If you send the URL as notification (or save in variable) and you play it yourself through a browser like chrome, does it work?
Does Chromecast have acces to the same network as Homey?

The source is on bitbucket, if someone with a Chromedevice has the same issues and can debug (or even fix) i would be happy to try and solve it, if it is a issue with my app.

I just checked the sourcecode for com.google.ChromeCast on GitHub, and the OnCastWebsite, which you should be able to trigger through a Action Card “Cast Website”, send it as a audio/mp3, just as it should be.

Have you tried Cast Website with the Url token?

Disclaimer: This comment is based purely on reading the source for ChromeCast. :wink:

Now it works flawlessly, and the voice output is also much faster. :+1:t3:
Thank you very much!

I don’t understand how create a google cloud device…:cry:

In Homey, create a Device, select the Google Service App and then select the Text-ToSpeech device.

I installed the app and created the devices, but after that I am stuck. What do I need to do to have a device speaking? I have Nvidia Shield and Google mini, will that do? And I see a message about a Json file. Do I need to do something extra? Thanks for your help
Grtz Eric