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

**URL:** <https://community.homey.app/t/app-pro-google-services-app-for-translate-and-new-text-to-speech-for-any-device-with-url-input/43257>\
**Category:** Apps\
**Tags:** app, tools\
**Created:** [February 25, 2021, 10:50am UTC](https://community.homey.app/t/app-pro-google-services-app-for-translate-and-new-text-to-speech-for-any-device-with-url-input/43257 "2021-02-25T10:50:00Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [February 25, 2021, 10:50am UTC](https://community.homey.app/t/app-pro-google-services-app-for-translate-and-new-text-to-speech-for-any-device-with-url-input/43257/1 "2021-02-25T10:50:00Z")

</div>

**Update: Added a YouTube device to search YouTube**  
**Update: Added Volume Gain and Device Profile to CloudTTS device settings**  
**Update: Added prefix-pause and suffix-pause to CloudTTS device settings (for Chromecast users)**

Use the newest Google Cloud Services, starting with the new Text-to-Speech, Translate and YouTube.  
 ![]()  
See steps below for how to get the JSON.  
 ![]()

![]()  
**YouTube**  
You can make a YouTube device and use it to search video’s.  
Currently it will trigger the YouTube device trigger with the first found result.  
More functionalities, like playing lists, will be added.

![]()  
**Translate**  
You can make a Google Translate device and use it as a condition to translate, of which the transalation will be available as a tokenvalue of the device.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/2/72957e140f535b4738e876ea2242730342a0c74f.png)  
 ![]()  
 ![]()

**Text-To-Speech**  
Useable with each device that takes an URL.

Cloud devices:  
All languages that Google supports, are supported, because the settings are build from live data, so when a new language becames available, it will be for this App also.  
You can set the Voice in the settings, but also within (certain) flowcards.  
You can set Pitch, Speed, Volume Gain and Device Profile per device (will be overruled by flows with pitch and/or speed).

Also you can add a prefix and/or suffix pause in the device settings, which is particularly useful for Chromecast users:  
A pause added the beginning will separate the notification sound and the actual speech.

SSML coding is accepted now, like: \<speak\>Here are \<say-as interpret-as="characters"\>SSML\</say-as\> samples.\<break time="3s" /\>. And continue\</speak\>

> **[Speech Synthesis Markup Language (SSML)  |  Cloud Text-to-Speech...](https://docs.cloud.google.com/text-to-speech/docs/ssml)**

You get a URL for the audio that will be streamed through Homey, so the device eventually playing the mp3 file should be in the same network and have access.

The last 100 transcripts are stored in Homey’s Memory for speed and less requests to Google Cloud (restart of app or Homey means reset of memory).

Create a House device that triggers all applicable devices to say “Dinner is ready!” or just a device for the main room to say “The doorbell is ringing”.  
You can add “devices” as many times as you would like, each with its own trigger.

Conditions are also available! You can let a flow wait in de condition till speech is finished before turning to the Then part of the flow.

This works great with other Apps like Sonos (Play Audio Clip (with volume)), Samsung Smart TV (Launch Browser with URL), Sonos Say (Url) and IFTTT.

# How to get the Google Cloud Service Account (JSON)?

To use this app you will need to do the following:

- Create a Google Cloud account.
- Setup billing for your Google Cloud account  
[Learn how to confirm that billing is enabled for your project](https://cloud.google.com/billing/docs/how-to/modify-project?authuser=1).  
_It is free, but setting up billing information is required for using Text-to-Speech_
- Enable the required two API’s at [API Library - Google Cloud Platform](https://console.cloud.google.com/apis/library?authuser=0&folder=&organizationId=)
  - Cloud Text-to-Speech
  - Cloud Translate
  - YouTube Data v3

- Create a service account - follow the steps below

1. In the Cloud Console, go to the **Create service account** page.[Go to Create service account](https://console.cloud.google.com/projectselector/iam-admin/serviceaccounts/create?supportedpurview=project&_ga=2.91443098.1043083801.1618058270-1226356663.1613394548)
2. Select a project.
3. In the **Service account name** field, enter a name. The Cloud Console fills in the **Service account ID** field based on this name.In the **Service account description** field, enter a description. For example, `Service account for quickstart` .
4. Click **Create**.
5. Click the **Select a role** field.Under **Quick access** , click **Basic** , then click **Owner**.
6. Click **Continue**.
7. Click **Done** to finish creating the service account.Do not close your browser window. You will use it in the next step.

Create a service account key:

1. In the Cloud Console, click the email address for the service account that you created.
2. Click **Keys**.
3. Click **Add key** , then click **Create new key**.
4. Click **Create**. A JSON key file is downloaded to your computer.
5. Click **Close**.

**Easiest way to enter the JSON in the settings would be throught the developer site: [Homey Developer - App Settings](http://developer.athom.com/tools/app-settings)**.  
**Open the Google Service Settings and copy/paste the whole JSON text into the JSON field.**

**For YouTube you will need to generate an API key and set it in the App Settings**

It’s free upto 4 million characters per month for non-Wavenet voices AND 1 million characters per month for Wavenet voices.

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)  
As of release 1.6.3, if everything is set correctly, but during translation an error is given by Google Cloud, the message wil me given as notification.  
Bandwidth excausted, meaning quota reached, is useally not about the monthly quota, but the minutes quota which you can set yourself in you own Google Cloud Console (account).

You can set the quota’s in the Google Cloud Console. You have to look for it. There are 2 global quota’s: 300 requests per minute, and 150.000 chars per minute.  
**BUT**  
There is also a 300 limit chars per minute during your trial account.  
You can freelly upgrade to a full account, which will remove the 300 characters a minute and enforce the global 300req/p/m en 150k.char p/min.

**Old Google TTS**  
There is the also old Google TTS device, with a max. 200 characters and limited options.  
You do not need a Google Cloud account for that.

These languages are currently supported in Non-Cloud:  
Engels (GB)  
English (US)  
Dutch (NL)  
Dutch (BE)  
German (DE)  
German (LU)  
French (FR)  
French (BE)  
Spanish (ES)  
Italian (IT)  
Swedish (SV)  
Norwegian (NO)

**Wanna play it on Homey itself?**  
[Music Url Converter - Play Music URL’s on Homey bigger then 900 KB - Apps - Homey Community Forum (athom.com)](https://community.homey.app/t/music-url-converter-play-music-urls-on-homey-bigger-then-900-kb/43546)

This works great voor a PA system:  
[How to make a Great Public Announcement ¶ System with any device! - Apps - Homey Community Forum (athom.com)](https://community.homey.app/t/how-to-make-a-great-public-announcement-pa-system-with-any-device/43481)  
  
**Step 1**  
Create a Google TTS Cloud Device.  
In Homey, create a Device, select the Google Service App and then select the Text-ToSpeech device.

**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](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/2/02dd31351c29ff6438fa0a7bf2f70ba543330c1e.png)

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

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/9/5963e3b3ae3d6737c72f144581bf9e1027659cb7.png)

### Please report **issues** or **feature** requests at [QlusterIT / nl.qluster-it.GoogleServices/ issues — Bitbucket](https://bitbucket.org/QlusterIT/nl.qluster-it.googleservices/issues?status=new&status=open).

### Apps:

> [@\[Profile\] Arie J. Godschalk](https://community.homey.app/t/profile-arie-j-godschalk/70663/2):
>
> Apps developed or maintained by me: [Advanced Triggers](https://community.homey.app/t/app-pro-advanced-triggers-trigger-and-action-cards-with-eventname-for-advanced-flows/65651) , [BeNext](https://community.homey.app/t/app-pro-benext-benext-devices-for-homey/76104) , [Better Logic](https://community.homey.app/t/app-pro-better-logic-just-some-better-logic-and-variable-management/5568) , [Chronograph](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214) , [Device Capabilities](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287) , [Advanced Virtual Device](https://community.homey.app/t/app-pro-advanced-virtual-device-device-capabilities-app-with-unique-text-status-indicator/68198) , [FTP Client](https://community.homey.app/t/app-pro-ftp-client/70876) , [Google Services](https://community.homey.app/t/google-services-app-for-translate-and-new-text-to-speech-for-any-device-with-url-input/43257) , [Homesh Controller](https://community.homey.app/t/app-pro-homesh-controller-homesh-satellite-connect-homey-pro-2023-to-homey-pro-for-led-speaker-zwave-satellite-and-network-resource/70369) , [Homesh Satellite](https://community.homey.app/t/app-pro-homesh-controller-homesh-satellite-connect-homey-pro-2023-to-homey-pro-for-led-speaker-zwave-satellite-and-network-resource/70369) , [JSON Handler and Manipulator](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317) , [LOQED](https://community.homey.app/t/app-pro-loqed-your-personal-doorman/89816) , [Music Url Converter](https://community.homey.app/t/music-url-converter-play-music-urls-on-homey-bigger-then-900-kb/43546) , [Simple Log](https://community.homey.app/t/simple-log-app/146) , [Universal Media Player](https://community.homey.app/t/universal-media-player-a-generic-storages-place-for-your-homey-speakers-tvs-or-other-media-devices/43450) and [Virtual Devices](https://community.homey.app/t/app-pro-virtual-devices-virtual-devices-to-simulate-1-or-more-real-devices/1723) . [Goto profile of Arie J. Godschalk](https://community.homey.app/t/profile-arie-j-godschalk/70663) for more …

### Donations or Sponsorship

> [@\[Profile\] Arie J. Godschalk](https://community.homey.app/t/profile-arie-j-godschalk/70663/3):
>
> Donations or Sponsorship. You can help with the development, maintenance and support for the Apps, by donating or becoming a sponsor. This would be much appreciated! The more donations i receive, the more time i can make free for development and support. slight_smileDonations can be done through: [[PP] PayPal](https://paypal.me/QlusterIT) Requires a PayPal account. [[GS] Github Sponsors](https://github.com/sponsors/XeroxQ) Allowes for CreditCard. Sponsorships can be done through: [[P] Patreon](https://www.patreon.com/QlusterIT/membership) Requires a Patreon account. [[GS] Github Sponsors](https://github.com/sponsors/XeroxQ) …

---

_[View the full topic](https://community.homey.app/t/app-pro-google-services-app-for-translate-and-new-text-to-speech-for-any-device-with-url-input/43257)._
