#author("2020-02-10T10:31:26+00:00","default:mizutu","mizutu")
#author("2020-02-10T10:46:18+00:00","default:mizutu","mizutu")
[[私的AI研究会]] > Google Cloud Platform

* Google Cloud Platform [#pb754a8e]
#ref(画像一覧/20200210_000002_001s.jpg,right,around,25%,20200210_000002_001s.jpg)
#contents

** 登録と設定 [#yd242056]
*** 「Cloud Platform」サインアップ [#t2542141]
- [[https://cloud.google.com/>+https://cloud.google.com/]] からコンソールにアクセスしてGmailアカウントでログインする。~
個人的な利用の「自分用」を選び、新規プロジェクトを作成する。
-- プロジェクト名:RaspberryAi
-- プロジェクトID: raspberryai-mizutu

*** 「Google Assistant API」の有効化 [#rc59cf8f]
- 「Cloud Platform」上の検索窓から Assistant API を表示し、APIを有効化する。

** Assistant SDK インストール [#cca18956]
*** 「Action on Google」プロジェクトの作成 [#l1ebed2c]
#ref(画像一覧/20200210_000001_001s.jpg,right,around,25%,20200210_000001_001s.jpg)
#ref(画像一覧/20200210_000000_001s.jpg,right,around,25%,20200210_000000_001s.jpg)
- [[https://console.actions.google.com/>+https://console.actions.google.com/]] にアクセスして新規プロジェクトを作成する。
-- ProjectName: RaspberryAi
-- language: Japanese
-- country:  Japan
#clear

*** 「Google API」認証情報の設定 [#k301c155]
- [[https://console.developers.google.com/apis/credentials/consent>+https://console.developers.google.com/apis/credentials/consent]] にアクセスし、「アプリを編集」を押し左カラム「OAuth 同意画面」を選択。
-- アプリケーション名:RasAiApp
-- その他の項目はデフォールトで作成する。

*** アクティビティの設定 [#o72eba3c]
- [[https://myaccount.google.com/activitycontrols>+https://myaccount.google.com/activitycontrols]] にアクセスし、「ウェブアプリのアクティビティ」「デバイス情報」「音声アクティビティ」をONにする。

*** モデルの登録 [#ycd9d47d]
- [[https://console.actions.google.com/>+https://console.actions.google.com/]] にアクセスしてデバイスを登録する。
-- Action Console からプロジェクトを選択し、Develop タブの左カラムDevice registration を選び「REGISTER MODEL」からデバイス登録する。
-- Product name: RasAiPrd
-- Manufacture name: RasAiMnf
-- Device Type: Speaker (選択)
-- Model Id: raspberryai-rasaiprd (自動生成されるIDを使う)
--「REGISTER MODEL」を押す。

*** Traitsの設定 [#u3f42bc1]
-- 前項の操作によって証明書ダウンロードのページが表示される。~
&Color(red){Windowsの場合(Edge/IE)ダウンロードボタンを押してもダウンロードできない(2020/02/19現在)ので次に進む。};
-- All traits を選んでSAVE する。
-- デバイスの登録が終わるとデバイス一覧に表示される。この画面から証明書の再取得ができる。~
&Color(red){VNCビューアなどからRaspberry Pi 上のWEBブラウザを呼び出し先の画面の再取得で証明書をダウンロードすることができる。(取得場所: ~/Downloads)};

#br