This article assumes that you already created a project for this AIY Voice Kit and made enable to use Google Assistant API , and created OAuth 2.0 client ID.
- Download the credential JSON file from your GCP account (your Voice Kit project).
To do this, go to https://console.cloud.google.com and select your Voice Kit project from drop down menu bar that just next to the “Google Cloud Platform” letters which is the top position of your browser. After this, go to API & Services page, using search window, where is the center of the top bar. Type “API & Services” and click the drop down result. And click Credentials of left side menu. Check your Voice Kit project fnom OAuth 2.0 client IDs list. And Download the client_secret JSON file.
- Copy the content of the client_secret JSON file to your Raspberry Pi Zero AIY Voice Kit. The path and file name is ~/assistant.json of your Raspberry Pi Zero AIY Voice Kit. To do this. access to your Raspberry Pi Zero through ssh command from your Terminal. And make assistant.json file using touch command. Or Nano, Vi. Copy the contents of client_secret JSON file from your computer, and paste it to the ~/assistant.json file and save it by your text editor. You can do this through SSH connection.
- Launch ~/AIY-projects-python/src/examples/voice/assistant_grpc_demo.py python script and authorize your Voice Kit to the GCP project. After launch the python script, it outputs URL to authorization. So go to the URL using web browser and login to your Google Account. It will outputs the code to authorize your Voice Kit. Copy the code and paste it to the python script output after “Enter the authorization code: ” prompt.
That’s all you have to do to authorize your Voice Kit for the second.