Homey Community Forum

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

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).

New question, how would you make an interaction flow? Let’s say i ask Google if my heating in the study is on or off. This will trigger a flow checking the heating and gives back a answer. After this it will ask me would you like me to turn on the heating Y/N?

I will have a look at a transformation in the device setting so you could create a default (outer) text.

Before i can answer that, what are you options of asking questions? Can it be done with Chromecast app?
Or do you wanna use Homey Speech (thats gonna be removed in a few days/weeks)?

What is your input (and output) method (because i’m not seeing any input with chromecast app cards)?

Something like this would do the On part with a question.

But if you also want to ask If it should be turned OFF, then you would first need to split this flow into 2 other flows and create 2 more, total of 4 flows would be needed at least.
I can make some examples but first need to know your input methods.

This is why i created H.O.O.P. (Hope) - Homey Object Oriented Programming

With H.O.O.P. you can create this flow:

There are no setting or whatsoever in the app :frowning:

Maybe a setting for each created TTS device with default setting “0” which means off. Every value 0.1 → XXX seconds will add the SSML breaktime under water at the start for every device. This will solve the specific Google Cast annoyance for simultaneously sound.

Maybe a setting for each created TTS device with default setting “0” which means off. Every value 0.1 → XXX seconds will add the SSML breaktime under water at the start for every device. This will solve the specific Google Cast annoyance for simultaneously sound.

Yeah was thinking about it that way yeah. I hope i can do something today.

But what do you mean there are no settings?
The App has settings (to set JSON for one).
And the devices have settings.

If the homey speech stops, this will not work anymore if i am correct?

Indeed, speech will stop working. Thats why i asked what kind of mehtods are available to you?
Do you use Google integrated? Does it have a Someone Says card or anything like that?

I don’t know, i use a smartwatch with my own apps that has cards like someone-said, ask, etc

Really, there are no setting in the Chromecast app (Athom) nor setting in the specific casting devices (only energy consumption)

Ah, you mean in the Chromecast App. Okay, gotcha :wink:

I only have Google Nest devices for receiving voice

Yes, I copy and paste the JSON into the Google Services app making use of the developer site.

Maybe I’m doing something wrong with the location of the JSON. Of indeed with enabling the API.

I go to the link mentioned in your start post. I enable the translation API and choose the project I’ve created for this. Then I choose to not use the App Engine or Compute engine. Then it asks ‘what credentials do I need’ and it tells me You already have credentials that are suitable for this purpose. I download the JSON for this user.

The following api’s have been enabled:

  • Cloud Text-to-Speech API
  • Cloud Speech-to-Text API (not needed I guess)
  • Cloud Translation API

I do have the following with credentials:


But can’t imagine I need this?

Hey @Rwin ,

I have added a prefix and suffix pause (ms) in the device setting and its live!

I’ve got everything working with great help of @Arie_J_Godschalk thanks! Going to transform all my current TTS flows.

Quick question; do I understand it correctly every text string needs a own device? I guess so since only one URL is getting created with the mp3 file. Wanted to double check.

1 Like

Tested it, delay set on 500MS is perfect for Google Chrome Cast, speech runs natural after Google build in casting signal (not simultaneously anymore).

Some minor improvements: set default value to 0. After setting the start value it gave an error because i didn’t fill in the end value. Keep in mind peeps who change let’s say the DB value will get an error because these 2 new values are left undefined.

Snelheid/Speed: in the description give the value for normal (i guess 1)
Vertraging bestand: in the description dutch writing error wachtwijd = wachttijd
Apparaat profiel / device profile: link to Google reference the some more info on this feature?
Volume versterker: dutch writing error audiomet (missing space)

But again, changes made are perfecting the use with Google’s own chrome cast devices in combination with this app

I’m tracking this for some time already, but can someone tell me, what are the advantages of this approach compared to TTS ? Is it faster and more natural, or ? Thank you :wink:

Hey RWin,

Thanks, i’ve added the defaults.
Also included all your other advises, thanks!

Submitting it to Athom now.

Hey Sharkys,

Well, to list the options you have:

  • Pick any voice you want, there are a few hundreds, multiple per language (dutch have a total of 10 you can pick from)
    These voices are much better then the old google translate voices.
  • You can choose WaveNet voice, kinda like A.I. voices, which are way more natural then the old (or new/normal) voices.
  • You can set Pitch (highness of the tone)
  • You can set Speed in percentage, not just slow/normal
  • You can set delay accourding to your device to use conditioncards and wait for speech to finish before the next actioncard.
  • You can add pauses to the end or beginning (handy for Chromecast users)
  • You can use SSML (see link at the topicstart) - This is also a real game changer!
  • You can choose a device profile, which is an audio effect which will be applied.
    Set this to large speaker or heaphone or google mini
  • You can set a volume gain.
1 Like