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

If there is a error, there should be a real error. Not fixing the JSON correct will show when clicking test flow. ← Apparently not always.

When you play the URL self in a browser (send it to your phone or put it in a variable and copy/paste, does the file play?
If So, try the Cast a audio URL from that variable, does it work now (did for someone else).

Is there anyone else reading this that does have a Chromecast device that knows if this works?
Or does anyone knows if the Cast a audio URL requires a HTTPS?

No sorry i’m so dumb…i create a cloud account,the Json file is download on my phone but where i put the file please?

Regarding JSON, I had guessed, but did not know.

The easiest way is to do it on the computer.
Download the JSON file → open the JSON file with an editor → copy the content
Open Developer in a browser → login (if necessary) → App Settings → select “Google Services” → past the content → choose a voice → fill in the name of the project → save

Thanks will do that when i’m home with my computer.Keep you informed if it’s working😉.Thanks again for your patience

Does anybody have a sample flow how to use SSML in a flow card?

Could you please show/share your various flows?

Yeah here are some examples,

<speak><p><s>Let OP: <break time="0.5s"/></s><s>We gaan over 10 minuten eten.</s><s>Iedereen naar de WC gaan, handen wassen en tafel dekken.</s></p></speak>
image

<speak><p><s>Let OP: <break time="0.5s"/></s><s>We gaan nu eten.</s><s>Ik ga ervanuit dat iedereen aan tafel zit, goed zo!</s><s>Eet smakelijk!</s></p></speak>
image

Or, combine them:
Step 1.
Create a text variable that you reset every night to a whitespace ( ) for example.
Like: Te doen meldingen (to make announcements)

Step 2.
Then create a few flows that fill that variable with sentences (including the variable self, else it only holds one text) <s>text</s>:

Step 3.
Then create a speech flow that triggers the TTS speech device:
The variable is included within the paragraph <p>.
image

Step 4.
Then create a Speak flow:
Here i first clear to variable to a whitespace ( ), then I trigger all flows from step 2 after 1 second (after the variable is cleared).
After 5 seconds the Speech flow is triggered, starting the speech with the filled variable in the middle.

Then finally, create a flow that triggers from Step 2 to create a string/text:

And ofcourse you need to trigger the _start flow with triggers, like saying goodmorning :slight_smile:

Have fun!

1 Like

Thanks, now it is clear to me how te make the flows.

I will make some test flows to test the following settings in the text:

pauze : <break time="200ms"/>

prosodic break: <break strength="x-weak"/> or <break strength="weak"/> or <break strength="medium"/> or <break strength="strong"/> or <break strength="x-strong"/>

etc.

Yeah, and remember, you need to start and finish with the (case-sensitive) <speak> … </speak> or else it will just see it as Text and not Ssml.

Finally,i have a working app now!Works very well on Nest product,great app,thanks to the developper and Fantross for his help,goodbye old app Google Tts,welcome for this one!!

2 Likes

Nice to hear!

Just FYI: All my app does is check if the text begins with <speak>, if so, send it to Google as SSML instead of generic text. So everything Google supports (and that is some, but by far not all SSML posibilities) is supported as wel. And when they add features or support voor curtain ssml commands/elements, it will automaticly be “available” in my App, no need for updates or anything.
(same for voices)

Hi Arie, i tried to setup the google service account to use your app but it said i had to make a billing account with my creditcard to make it work.
Although the creditcard won’t be used with a trial version they say i didn’t proceed.
First i would like to know if it’s possible to make the service account without making the billing account.?

My question exactly. I do not have a creditcard. Do not want one either. Can it be done without billing profile…

Hey Martin,

It is not possible to use Text-To-Speech without filling in the Credit information.
Currently the amount of 4million normal voices and 1 milion characters Wavenet voices are not something you have to worry about, i use it quite a lott (also for testing and my smartwatch who just keeps talking :wink: )
But if they lower it or make it must pay, there is not much i can do about it.

I have been using (the source) to this app myself for awill, and it is great to have Homey really speak everything whereever i am in the house.
So i wanted to share this with other Homey users, giving people the ability to use it with as minimal work (just getting a token). But considering the amount to pay Google if i did it directly on my own account, and not being able to moneytisch the App or retrieve real funds, building the App with a build in Google Service Account was out of the question :wink:

And about the amount of characters:
To see how many characters you have used up, goto the Google Cloud Console homepage, and to the right click on View detailed charges (the filter Group By SKU should be on)

Thank for the info Arie, good to know.
Thanks for making the app :+1::muscle:

Furthermore, even a with a Full account (non-trial) i have no billing at all, because of the low consumption.
But that ofcourse is no garanty on how Google will handle billing in the long run :wink:

In some flows before I start TTS, I start to play a MP# sound. This file is stored on Homey via the Soundboard app.

With the Google Services TTS I like also to start first the MP3 ander than the TTS part. To do so I have installed a Webserver on Homey but this is not the preferred solution.
Will it be possible in future updates to store via the Google Services app, MP3’s on Homey and access them via casting?

Yeah, have a look: i created a App for this:

It sends sounds/mp3 from a UPnP Server (Synology or any (Asus) Router with Media/UPnP Server on it) to any device through a URL, same as with the Google Service App.

I made that App espesialy for this purpose, playing announcement sounds before voices.

I explain all my apps in a topic about this (i think this is pressisly what you are looking for):
How to make a Great Public Announcement ¶ System with any device! - Apps - Homey Community Forum (athom.com)