I didn't have much information when I wanted to use Google Assistant on Windows, so I will summarize what I searched for. However, as of August 19, 2020, it seems that the available functions are limited. Details are summarized below.
・ Python == 3.6 ・ Windows10
I quoted from here. https://developers.google.com/assistant/sdk/overview
Supported architectures | All gRPC platforms |
Supported languages | All gRPC languages |
Hands-free activation | No |
Audio capture and playback | Reference code is provided |
Conversation state management | Reference code is provided |
Timers and alarms | No |
Playback of podcasts and news | No |
Broadcast voice messages | No |
Visual output (HTML5) of Assistant responses | Yes |
You can check the latest information from this URL. https://developers.google.com/assistant/sdk/release-notes
Python environment construction is omitted here.
Open Google Cloud Platform and click ** "Create Project" ** in the upper left. https://console.cloud.google.com/cloud-resource-manager
Enter any name you like in Project name. (The project ID can be changed, but it must be all lowercase and end with a single-byte number.)
Open the Google Assistant APIs in a separate tab. https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview 自分の作ったプロジェクトを選択し、Openをクリック。
Click ** "CREATEC REDENTIALS" ** on the upper right.
Fill in the selection fields as shown in the image. Then click ** "What credentials do I need?" **. Then click ** "SET UP CONCENT SCREAN" **.
Then select ** "External" ** ** "CREATE" **
Decide on a Project name. However, it may not be recognized that it contains a famous company name such as Google. Then click ** "SAVE" ** at the bottom.
Go back to ** "Credentials" ** with the lock on the right. Select ** "Help me choose" ** from ** "+ CREATE CREDENTIALS" ** above.
Fill the selection field again as shown in the image.
Then decide on the name of ** "client id" **. Then click ** "Create OAuth client ID" **.
Enter ** "Create ID" ** and press ** "Download" **. (The file downloaded here is not used.)
Press ** "Done" ** and then press the arrow on the far right of your project column to download the json file.
Create a folder directly under the C drive for the json file downloaded here and put it there.
Install the Google Assistant SDK by typing the following from the command prompt.
py -m pip install google-assistant-sdk[samples]
16 Next, enter the following to install.
py -m pip install google-auth-oauthlib[tool]
17 Enter the following at the command prompt.
google-oauthlib-tool --client-secrets C:\The location of the json file\ --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless
18 Copy the displayed URL and search with a browser. Click Allow twice to allow integration with your account. You will see the code you need to sign in, so copy it.
19 Return to the command prompt, paste the copied code and press Enter. The information in the json file is saved in your account.
Once you have completed 20 or more operations, you can test the recording and playback with the following chords.
py -m googlesamples.assistant.grpc.audio_helpers
21 Move the json file to the folder where it is located on the command prompt.
22 Enter the following command on that folder.
googlesamples-assistant-devicetool --project-id my project ID register-model --manufacturer “Please decide the manufacturer name yourself”--product-name “Please decide the product name yourself”--type LIGHT --model “Anything is fine.”
23 Finally, enter the following command.
py -m googlesamples.assistant.grpc.pushtotalk --device-model-id “My model ID”--project-id your project ID
24 If successful, you will see ** "Please Enter to send a new request ..." **. After entering Enter, he will answer that you can talk. (However, it is in English at this time.)
https://www.lifewire.com/google-assistant-on-windows-4628292
Recommended Posts