Google Assistant has been one of the best services lately on Android for everybody who loves the Google products and since the evolution of Google Pixel, Google Assistant has been in action and so have our Android smartphones which are receiving the services of Google Assistant beginning from Android Marshmallow. Now as you know, the Windows, Mac and Linux machines still remain untouched by google Assistant, but now, we are providing you with the guide of how to enable google assistant on windows, mac and linux.
This is going to be a long process which requires your full attention and for sure some patience. I am going to show you the procedure to install google assistant on windows and other platforms.
PYTHON 3 — DOWNLOAD FROM HERE
Command Prompt Knowledge (Basic)
This is a simple process but anyway, requires you to install Python. Just visit the main website and you will be provided with separate download links for each of the operating systems that you use. When you install Python, just run the command window and simply type python. If you receive the result with the current version specified, let us move further then.
Now as we move forward with the procedure of how to install google assistant on windows, we will need to enable access to the Google Assistant API which is in the Google Cloud Platform Console.
Let us get you introduced with the steps to enable the Google Assistant API in Cloud Platform Console which we have already talked about. However, these steps remain the same for Windows, Linux/GNU as well as macOS:
- Visit the Google Cloud Platform Console and open the Projects page.
- Now, click on “Create Project” button on the same page which you will find in the upper portion.
- Name the project as “My Google Assistant” and just after that, click on the create button.
- Wait a few seconds till your project is successfully created.
- Now, you will be brought to project’s configuration page.
- Now, go to Google Assistant API page via this link and click “Enable”.
- Click on the button of “Create Credentials” as directed by Google which will take you to a steup wizard page.
- Now, you will be provided with certain option (FOLLOW ME HERE) and under “Where will you be calling the API form” select the option of “Other UI“. And, for “What data will you be accessing”, select the “User Data” circle.
- Now, tap on “what credentials do I need?” button.
- Just name the client anything which you want and once done, click the button of “create client ID.”
- Now under the “product name shown to users” button, enter the name “My Google Assistant” and once done, click on the “Continue” button.
- Click “done”.
- Now you will find the client ID you just made under the list of OAuth 2.0 client IDs. On the right, click on the download icon to download the client_secret_XXX.json file. Save this file on your PC in a new folder called “googleassistant.” Note that XXX is your client ID.
- Now, go to this Activity Controls Page and enable each option which you see.
Now, as we are done making a mechanism for a client, we will now set up the client that will access the Google Assistant API.
1. Open a command prompt window and enter the following code:
py -m pip install google-assistant-sdk[samples]
2. As soon as you enter this command and hit enter, you will see the dependencies for Python getting downloaded and installed on your PC. Wait till this process finishes.
3. Once done, enter the next command given below:
py -m googlesamples.assistant.auth_helpers –client-secrets path\to\your\client_secret_XXX.apps.googleusercontent.com.json
4. You will be asked to visit a URL to authorize the application. Copy and paste the given URL in your browser window and access it from the same email account via which you configured Google Assistant API. On the page which follows, you will see a text box which will contain your client’s access token.
5. Paste the same Access Token code in the command prompt window which asked you for the authorization code. On success, you will see a response that it has saved your credentials.
Testing the new Google Assistant on Windows and other platforms
The basic test is to record voice and play it back to you and for that, you will again need to enter some commands in the running command window.
Enter the following command and it will record your voice for 5 seconds:
python -m googlesamples.assistant.audio_helpers
If you are successful in the first test, then start talking to Google Assistant via the following command:
python -m googlesamples.assistant
So, that was the full procedure of install google assistant on windows or how to enable google assistant on windows, mac and linux. If you faced any issue during this process, feel free to ask me in the comment section below and I will answer your queries.