# Ez Google AI

<figure><img src="https://1427565863-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwuVpDcDmZQqJGW4nltd9%2Fuploads%2F3HXfRPNufmM1fnXlG8lj%2Fimage.png?alt=media&#x26;token=63ed86ce-d876-4b6b-afda-003262699a30" alt=""><figcaption></figcaption></figure>

## 🔗Links

&#x20;      [**Plugin Link on Bubble Marketplace**](https://bubble.io/plugin/ez-google-ai-1695039153048x585146580007387100)

&#x20;      [**Plugin Link on Our Website**](https://eazycode.com/one_plugin/ez-google-ai-1704796101906x282718225130788030)

&#x20;      [**Demo Link** ](https://eazycodedemo.bubbleapps.io/version-test/google_ai)

&#x20;      [**Bubble Editor**](https://bubble.io/page?type=page\&name=google_ai\&id=eazycodedemo\&test_plugin=1695039153048x585146580007387100_current\&tab=tabs-1)

***

## Introduction

There has never been a more exciting time in technology. We are experiencing one of the most significant shifts in history, where AI is creating entirely new ways to solve problems, engage customers, and work more efficiently. Google Cloud is ready to help organizations build a new way forward in an increasingly AI-driven world. We are glad to bring Google AI  technology to the Bubble community.  We decided that to have all tools in one place  is best practice, so **Ez Google AI** combines several actions in one plugin:

* **Document AI**
* **Speech To Text**
* **Get Text from Image**
* **Get Safe Search**
* **Get Logo Search**
* **Get Landmark Detection**
* **Create Cloud Storage**
* **Upload to Cloud Storage**

You enter your private Key, Client ID, and Project ID in one place and it is ready to use **Ez Google AI**.&#x20;

***

## Instruction and Description

1. Create an account on[ Google Cloud](https://cloud.google.com/).\
   You can read more about the terms and conditions of registration, and further management of accounts, at the following [link](https://support.google.com/paymentscenter/answer/9028746?hl=en).
2. Enable APIs that You need to use (Image AI, Text To Speech, Speech to Text, Document AI, Cloud Storage).
3. Create Processor from Cloud Console(Needed for Document AI).
4. Create a Service Account. - Add Credentials to IAM.
5. Enable billing (needed, but You get from Google trial period and free calls).
6. Download a private key as JSONHints for Speech to Text.

### Auto Authentication

Open the private key JSON file with a text editor and copy/paste the following parameters from your file to the Plugin settings:\
&#x20;\- client\_email\
&#x20;\- project\_id\
&#x20;\- private\_key,&#x20;

Including the -----BEGIN PRIVATE KEY-----\n prefix and \n-----END PRIVATE KEY-----\n.\
How it’s WorkEz Google AI contains Actions, Specify trigger (button, event, etc.), and starts Plugin Action.

***

## Instruction to Document AI&#x20;

Specify element Action from WorkFlow, add Action “**Document AI- Get Text From Document**”&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/IIMRAYTlhlrhGZa-i4Ku6lBMNPl78Vs3NlHkfrDF55tlpa2jM_ojlwNTLPOiRqcYlzxKDAh7AuIagWKjSBLcTQ3RWamL8ybn-x2i800Qr1cqjdHYKFCc96LUspll6ZXElHzxDdGCWs94t7xyqd6KAs8" alt="" width="375"><figcaption></figcaption></figure>

Now You need to fill in the fields “**Processor ID**” and “**Link to File**” and choose “**Location**”&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/CopTUqewzs4hw8K3Lb_X20ynakqWyrISJVrnIWGy5mNHjqAs4rdunPyPJFrKoI5KScMpX3ae7XEOSoogShk5l6l7a6n0PNys5Myy-hThbpyb8sVyuAls0clFn5RMWU7JlKUsQXLrefsxsHT1MxN-R3Q" alt="" width="375"><figcaption></figcaption></figure>

* **Processor ID field** - Here you need to paste Your processor ID from Google Cloud Console, “My Processors” tab. If You don’t have a Processor ID, create one with the “Document OCR” type.&#x20;
* **Location** -  drop-down. By default, Document AI stores and processes resources in a US location. If you choose the European Union location, Google will store your data and process it only in the European Union.&#x20;
* **Link to File** - Bubble Uri to document \
  Example: “//0341b7fbc64b39338695c11fb9a66136.cdn.bubble.io/f1697709115621x854084300796481200/How%20much%20is%20the%20fish.pdf”&#x20;

After the plugin ends execution, you will get the response key-value object with the next keys: **Text**, **Language code**, and **error**.&#x20;

<figure><img src="https://1427565863-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwuVpDcDmZQqJGW4nltd9%2Fuploads%2FC6GhqJKD4KNrdgfOk49N%2Fimage.png?alt=media&#x26;token=c76629d6-f4e3-4d9c-b328-144518b0dc6e" alt="" width="323"><figcaption></figcaption></figure>

* **Text** - Contains all found text in one string&#x20;
* **Language Code** - Returns the language code of a document&#x20;
* **error** - Returns “null” for no error, or a String with an error definition&#x20;

***

## **Instructions to Image AI**

Specify element Action from WorkFlow, add Action “**ImageAI- Get Lable Search**”, practically all Image AI actions have the same Input Fields.

<figure><img src="https://lh7-us.googleusercontent.com/Gu050toLNxAHHHlWMFz1539j0SOfpnIvK14n35ipfMteinBrTCAq03vTiSq_W0PJWun07KSlC9S9QcSqiiyvG0gG9ZiN1iCd4biPCZlMCplD8dEYq98aiJNmRioLQPDttfREDeuPb6iq5G1uwV3i_bg" alt="" width="375"><figcaption></figcaption></figure>

Now You need to specify input fields “**Dynamic Image**”, “**Max Result**”&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/htannwfkHN9fiSarC7XEHhxP-tyoeVfi0HBh4V03jKYgE9Ef4JeECvEbskHdtzQ6WcrA3T020nqynuYVBRClrlOJu57D0WCb0QexNkjNETf1L7_azu70v-S2gUVFfmuf7SXCwScIJEcdWgUxZZuI5sY" alt="" width="375"><figcaption></figcaption></figure>

* **Dynamic Image** - Link to bubble Uri(ex. “//0341b7fbc64b39338695c11fb9a66136.cdn.bubble.io/f1697718926510x406478102390087000/items\_test.jpg”)&#x20;
* **Max Result** - Specify How many objects Image AI must recognize.&#x20;

After the plugin ends execution, you will get the response key-value object with the next keys: Found Items and error.&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/4jya1AuoguI1t2JQb-I7ofNzOe038ENyPTYd4lFYxTj4oHgu4f0tNfnAqnFQmFoPNP7zlXu7RYywztWqlYfoQTSOmZchlotFmS-KCj0YegTekcVwBIRT_fkmNFa82yv-3Xt2VIadv41WlKzgokElxsk" alt="" width="375"><figcaption></figcaption></figure>

* **Found Items** - Return the string of Objects found on the image.&#x20;
* **error** - Returns “null” for no error, or a String with error definition.&#x20;

***

## Instructions for Cloud Storage&#x20;

Specify element Action from WorkFlow, add Action “**STORAGE- Create Storage**”.&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/tSLziicp6jJbH72fDz_Ll0yetSal2P04iwQ9cdWmZhguOvwPnrv_TVc-y_PryQl5Bux7sRfs77Y0LuNCkUz2BwRcOs-AnF8BPzNEAEO94dBxPllvuBZJIQ6zw9ZTEw0XGpUyds9vQeg0MIW5A4_4PYg" alt="" width="375"><figcaption></figcaption></figure>

Now You need to specify the input field “**Storage Name**”&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/ofjqQya06ZHcJyYIz0gul5psJzOsy926MzBGwZqaDDZjm2dh1AIdakthvNeSPcDkmfMQiRYexVsHPzX4NTfsM8bNawG7tqjZE_BbhVof2BiJgBJ6KzL8AJ5eOu5Nj6ODeNmDiQu7gCeNpcQslv-19dY" alt="" width="375"><figcaption></figcaption></figure>

After the plugin ends execution, you will get a response key-value object with the next keys: **Status** and **error**.&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/pugX5vLQjoH5qsBK9BfSKt67NvRCis8D07Pfa1cLCJSP78ixy9UrpWs3d_mi7bJwnIBxtvoD5oXFOjxPAtN9t-DzksZ0Kw6mGab6KiOB_z3YbMsSnAUI-kOQl5PHvBt0TGVzRv3ppTNiI3UZnv9WGGg" alt="" width="375"><figcaption></figcaption></figure>

* **Status** - Returns “yes/no” result if bucked created&#x20;
* **error** - Returns “null” for no error, or a String with an error definition&#x20;

### Upload Storage Action&#x20;

For Uploading a file to Bucked You need to specify the Input Fields:&#x20;

* **Link to File** - Bubble Uri \
  (ex.”//0341b7fbc64b39338695c11fb9a66136.cdn.bubble.io/f1697718926510x406478102390087000/items\_test.jpg”)
* **File Name** - Name of the uploaded file to the bucket.
* **Bucket** - Name of Your bucket(Place, Where You want to store a file).&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/HP2uSV6A2u8CbvgX_t8whWqS54tAxe-PfPYg7dj8nRk24ciIWe4tBeDes98WoTjd5ByrODnXYZ1iliW5Fn8DVv5tsU3YU4_4QX2Z4iwoKNZMQHiygBmfE-cnUg0K2K8gHzw4DsbGwm57BHjbCgP5xK8" alt="" width="375"><figcaption></figcaption></figure>

After the plugin ends execution, you will get the response key-value object with the next keys: **gs Link**, **status**, and **error**.&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/zDxlIhErQIXfd-4qpScLzJvJk81xKQ6cvI88oM3dpSLjoQ7qPijpz1Bo6T2Bk9glTPwDPUJryJ9XWH6mjfNiZx6_HCmbmrE5GflH-uFcU5zSDm6yof9zkv8lSoyeL_thzXzncJWx95W-WBBWpRj0OhI" alt="" width="375"><figcaption></figcaption></figure>

-**gs Link** - Google Storage Link(Needed for Speech to Text action) ex. “gs\://{bucket name}/{filename}”.

-**status** - Returns “yes/no” result if bucked created.

-**error** - Returns “null” for no error, or a String with an error definition.

### Delete Storage Action&#x20;

For Deleting a file from Bucked You need to specify the Input Fields:&#x20;

* **Bucket Name** - Bucket from which You want to delete a file.
* **File Name** - Name of File.
* **Mime** - Specify file extension without “.” (ex. pdf, jpg, png, etc.).

<figure><img src="https://lh7-us.googleusercontent.com/BhPPx4ZbGnkzmYDrTUPNdqc1ARlNaejK1xb5v-v4_QcwdvHoIIyPklVHErrFNcp1cGNcukLS6rOoTlhVULRz4DJQRv5tDa529tLRtCImW6Mtd-fi1BNPp9BXxsleJZAjRlUPlwSBrkEn6Rv1RUbOteI" alt="" width="375"><figcaption></figcaption></figure>

After the plugin ends execution, you will get a response key-value object with the next keys: **status** and **error**.&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/qPSF4OvNTzE3f7x4boAU5otqzbZtUETmKMB6BCrMdvFPfo0d_qklKQDNNoWlRWF0TUg8u6gwhhevUjiAocNrHHFBWL8ooe7puuCwpxlI-t0U1ZMHY4PeI-5kk0EJLKKVT_LplugI61bzDykE7BIupRQ" alt="" width="375"><figcaption></figcaption></figure>

* **status** - Returns “yes/no” result if bucked created.
* **error** - Returns “null” for no error, or a String with an error definition.

***

## Instructions to Text to Speech&#x20;

Specify element Action from WorkFlow, add Action “**Text to Speech**”.&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/QC1rhIvTIanG4Xrk7sTx1sEB6Xo77QkCieU1zb7DO1JaShrKDCBR9jTUXgDa7laDOTe7tAqb6Pu9B8IKDkJh3BP_Zs7dbVgvNa3cLpSK2PTSQb71wm6Ti2-KY-c5Dmw4uDoxiyvuTDbBlg6kI1r8huc" alt="" width="375"><figcaption></figcaption></figure>

Now You need to specify the following fields: &#x20;

* **Home Url** - For “cross-origin” must be bubble.io home URL (needed for creating a link to an audio file)&#x20;
* **Text**. &#x20;
* **Language Code** - Choose Your Voice[ https://cloud.google.com/text-to-speech/docs/voices](https://cloud.google.com/text-to-speech/docs/voices).
* **Gender** - Choose the Gender of the speaker

<figure><img src="https://lh7-us.googleusercontent.com/kgKXDqNaAsH6cDqMVyN6sqzvc8jYoTAOIYwYIwdjyfwIBTA3rCpOV6VePozzZ8-dgvMTcNsF-mj-RSYv2qfdWYGmgVac7IBGSkUP6JenfbUolz4uFKYbCtleg1piw7nbfIlbjBcmHJh9r75YZQoFdDY" alt="" width="375"><figcaption></figcaption></figure>

&#x20;After the plugin ends execution, you will get the response key-value object with the next key.&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/gw3tC3Ib9IaIQW_O1f78oK7WXxzabbkHSg5yGiWwHiwk2Twfo09m5Zua5xaTl_MC8DXWzlwpW04Pk0-0pH7BnrFYvd2DUDemK4LBqoKQmJAJEyNcXib4rAuCtPgtyqFQTHyqIsJHmdUk1DR__mM7TfA" alt="" width="375"><figcaption></figcaption></figure>

* **file** - Returns link with your Audio File (ex. “<https://meta-l.cdn.bubble.io/f1698044891872x337292678477508540/EazyCode.mp3”>)

#### Speech To Text Action&#x20;

Now You need to specify the following fields: &#x20;

<figure><img src="https://lh7-us.googleusercontent.com/j0zZ204z4zdH03pHGb_ata2DibUFO9MIxwbfnW7sGm8Osfgciwd7rVYy3oodLv6H9qCuRCRjoOtl6hRvDFVKuOkut8agZDIOAVyNbXa8W9nyCJvOX9oEc68nhiYQ5n4Gs6sOFSdDip07KQKHe1YbOkY" alt="" width="375"><figcaption></figcaption></figure>

* **gcsUri** -  gs Link to your Audio File, for now, google can ONLY encode audio files from Cloud Storage Bucket, so the link must look like this: “gs\://cloud-samples-data/speech/brooklyn\_bridge.raw”&#x20;
* **Language Code** - BCP-47 language code, e.g. en-US&#x20;
* **Encoding** -  Google Speech-to-Text API can handle specific types of speech encoding.&#x20;
* **Model** - You must set the model field to one of the allowed values. <mark style="color:blue;"><https://cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/RecognitionConfig></mark>&#x20;
* **Profanity Filter** -  If enabled, Speech-to-Text will attempt to detect profane words and return only the first letter followed by asterisks in the transcript (for example, f\*\*\*). If this field is set to false or not set, Speech-to-Text will not attempt to filter profanities.&#x20;

**Enable Automatic Punctuation**&#x20;

* **Transcript** - Returns text string for Your Audio file.
* **Error** -  Returns “null” for no error, or a String with an error definition.

<figure><img src="https://lh7-us.googleusercontent.com/YsCPuK6KYJv9M37cvRVTPC9-SjTjoLoolMF1y8h_1dlmQ4YLYqRG_YS_yZd9cIlRNXWrQr0lNCcQWToQD9MggaDjT38WCTVObXLVYDMQ8m-xVvT7jtITFg0yNgs38R9DDIRjj2WZT4L0GrSQfIw01EY" alt="" width="375"><figcaption></figcaption></figure>

***

{% hint style="info" %} <mark style="color:blue;">Hint for</mark> **Speech to Text**
{% endhint %}

Speech to Text works only with “gs” links.  First, create a bucket or upload an audio file to storage, get “gs” link(ex. **gs\://bucket/filename**).\
If enabled, Speech-to-Text will attempt to detect profane words and return only the first letter followed by asterisks in the transcript (for example, f\*\*\*). If this field is set to false or not set, Speech-to-Text will not attempt to filter profanities.&#x20;

***

{% hint style="info" %} <mark style="color:blue;">Hint for</mark> **Text to Speech**
{% endhint %}

You can specify voices and Languages from <https://cloud.google.com/text-to-speech/docs/voices> \
You need to copy/paste the Language Code without “”.

***

{% hint style="info" %} <mark style="color:blue;">Hint for</mark> **Document AI**
{% endhint %}

You need to create a Processor with the “Document OCR” option.\
Location is a spec for where Your Site will OCR document. \
Document AI supports the following file formats:&#x20;

* **.pdf**
* **.gif**
* **.tiff**
* **.tif**
* **.jpg**
* **.jpeg**
* **.png**
* **.bmp**
* **.webp**

{% embed url="<https://cloud.google.com/document-ai/docs/file-types>" %}

***

{% hint style="info" %} <mark style="color:blue;">Hint for</mark> **Image AI**
{% endhint %}

Google has photo size restrictions, which you can find by the [link](https://cloud.google.com/vision/docs/supported-files).

***

<div align="left"><figure><img src="https://1427565863-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwuVpDcDmZQqJGW4nltd9%2Fuploads%2FOmA8OIR6KMcPc4Kd8oZW%2Fimage.png?alt=media&#x26;token=d8d79fa2-356b-4dd7-a687-fc59b1c965b3" alt="" width="188"><figcaption></figcaption></figure></div>

Feel free to contact us for any inquiries and we’ll be happy to find a solution for your ideas – <http://eazycode.com/>

**Hire us:**

<img src="https://1427565863-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwuVpDcDmZQqJGW4nltd9%2Fuploads%2FnhRM38XquaMB7rEGRZF5%2Fimage.png?alt=media&#x26;token=94debb70-7346-48cc-8e7a-ddac3b68cc70" alt="" data-size="line"> <https://www.fiverr.com/share/qQoDQZ>\ <img src="https://1427565863-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwuVpDcDmZQqJGW4nltd9%2Fuploads%2FUnmo0SgqtdtObJcWnXKG%2Fimage.png?alt=media&#x26;token=84a44ee4-c963-4409-ab03-5e03da5f9917" alt="" data-size="line"> <https://www.upwork.com/freelancers/~01c1a4cbef44ecb5f1>\
\
**Follow us:**

<img src="https://1427565863-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwuVpDcDmZQqJGW4nltd9%2Fuploads%2FY27NTLRLjxmS860b2LuF%2Fimage.png?alt=media&#x26;token=de978886-fe93-45d9-9aa2-dbe633c9c900" alt="" data-size="line"> <https://www.facebook.com/eazycode>\ <img src="https://1427565863-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwuVpDcDmZQqJGW4nltd9%2Fuploads%2FJxNkIN1XL49rJ0d1PW4h%2Fimage.png?alt=media&#x26;token=6bc2d54b-741e-4327-895e-c9d256e29cfc" alt="" data-size="line"> <https://twitter.com/ezcode_official>  \ <img src="https://1427565863-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwuVpDcDmZQqJGW4nltd9%2Fuploads%2FDIjJ2ERcrlmbdSWhRNBd%2Fimage.png?alt=media&#x26;token=0a8166ae-162e-4fcb-bef6-e458c760fee7" alt="" data-size="line"> <https://www.instagram.com/eazycodecom/>\ <img src="https://1427565863-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwuVpDcDmZQqJGW4nltd9%2Fuploads%2F0K22Xx5JDxzKfhXJkmSi%2Fimage.png?alt=media&#x26;token=90af72e3-5fcc-4ea2-baf6-56525f3e1e6a" alt="" data-size="line"> <https://www.linkedin.com/company/eazycodecom/>
