Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.

Account Setup for GA

E:V:A edited this page Apr 14, 2018 · 1 revision

Setting up your Google Accounts

⚠️ WIP

This page will show you how to properly setup your Google Account and retrieve the necessary authentication tokens for your Google Assistant.

Step 3. Requirements.

3-1) Auth for Google Assistant & Cloud Speech

You need to get a JSON file for OAuth2 permissions. https://developers.google.com/assistant/sdk/develop/grpc/config-dev-project-and-account Create a project for MagicMirror. Enable Google Assistant API and Google Cloud Speech API.

detailed steps for Google Assistant API
  • Login on https://console.cloud.google.com/cloud-resource-manager
  • Select CREATE PROJECTS.
  • Give a project name to this new project.(Google will suggest a unique name. Anyway, the name is not important. set this by anything.) And press CREATE Button.
  • Now you might be in Dashboard of the newly created project. (Or select created project from your project lists)
  • Go to API Overview (API & Services > Dashboard) from Menu or Cards.
  • Select ENABLE APIS AND SERVICES
  • Search Google Assistant API and dive into.
  • Press ENABLE.
  • You need to create credentials. Go to https://console.developers.google.com/apis/credentials/oauthclient
  • Set the Configure consent screen. You need to set only Product name shown to users.
  • Select Application Type as other and give the name. Now you can get oAuth.
  • Download your client-secret-blahblahXXX.json and rename it as secret.json. Put that file in MMM-Assistant directory.
  • Then execute this on your MagicMirror terminal.(not via SSH)
cd <Your MagicMirror Direcotry>/modules/MMM-Assistant
node google-auth.js
  • It will try to open the browser for getting some credential keystring. copy and paste it where the google-auth.js prompts.
  • Now, you can find token.js under resources directory. Keep it safely.
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.)