E3V3A / TESTT

TEST -- This is only a test repo - nothing here
0 stars 0 forks source link

What is the "project keyfile"? #21

Open E3V3A opened 6 years ago

E3V3A commented 6 years ago

You mention in the installation instructions to:

<your project key file location>' //REQUIRED

What is this?

All I have are:

secret.json
resources/tokens.js

Also: What is the difference between the simple version and full version configurations?

E3V3A commented 6 years ago

@E3V3A stt section is speech to text, - Google Cloud speech API. You should have to make or assign project to use Google APIs in Google Cloud Platform. Then you should obtain project key file with right permission of using Google APIs for your project. You can download that keyfile in Credentials section of your project in Google Cloud Platform. Put that file under your MMM-Assistant directory or below, and describe that path.

  1. The difference is... nothing. the full version is filled with default values, so simple version and full version are identically same. However, you can modify detail values with full version configuration.

E3V3A commented 6 years ago

Sorry, I simply don't understand. Is that file different from the 2 i mentioned above? I went through the procedure and have only those two files.

What is is called? Where is it generated?

E3V3A commented 6 years ago

Oh, is it the one containing your private key?? If it is, why is the private key needed? It should never be shared and could allow full access to all my google account...

E3V3A commented 6 years ago

Let's meet in chat room in magicmirror forum.

E3V3A commented 6 years ago

Ok, this is the story. Following the steps in the WIki.

These are very unclear:

detailed steps for Google Cloud Speech API

    Back to API & Services > Dashboard again.
    Select ENABLE APIS AND SERVICES
    Search Google Cloud Speech API and dive into.
    Press ENABLE.
    Select Create Credentials and Service Account Key. (It's obvious to be able to use secret.json again. 
For safe, I'll create another key file for Google Cloud Speech)
    Set the details (anything for service account name, Project>Owner for Role, anything for 
service account id, JSON for key type. After set, you can download your key file.
    It will be used in config.stt.auth

Tip : You can obtain keyfiles more than one if you can make another account. It could be helpful for 
saving money. (Google Speech API is very cheap, but not free. It allows you 60 minutes for free per 
month. But every recognition request is considered as minimum 15 seconds. So exactly 240 requests 
would be available for free. Additional request will be charged $0.006 per request. Anyway, if you create 
an account at the first time, about $300 for 1 year will be given freely.)

After you have added and enabled the two API's and services in your Dashboard:

  1. Google Cloud Speech API
  2. Google Assistant API

You will have at least 2 types of credentials under your Credentials part of the Dashboard, if you followed the previous steps. But there are 3 different types of credentials:

  1. API keys
  2. OAuth 2.0 client IDs
  3. Service account keys

If you don't already have a Service Account showing up there, you need to create one. Click on the Create credentials drop-down button. There you select the Service account key option. The next page will ask you the account to use, and what key type for the file to use. Select JSON, and save this key. The filename of this key will be something like: PROJNAME-a1b2c3d4e5f6.json. This is the "key-file" you need to save and add in your simple config.js.

NOTE: This is the private API key for this account, and project. It means that any one with this key can use tools to obtain info you have here. (I'm not sure if this is sandboxed from you email etc.)

If you already have one:

  1. Click on the [Manage service accounts](https://console.developers.google.com/iam-admin/serviceaccounts) text.
  2. Then you should already have a key somewhere, but if you lost it, you can create a new one by selecting the "3-dots" menu at the far right of the account. Clicking on it, there is the option Create key, elect it and (as above) save the resulting file. Just remember that you now will have two accounts, so that you match the key with the account id later. (???)

more to come

E3V3A commented 6 years ago

Thanks. You can modify it by yourself because wiki is opened for everyone.

E3V3A commented 6 years ago

Sorry. It was restricted as you've said. I modified that option now.