Install Google Assistant on any Windows, Mac or Linux PC

Now Google Assistant can be installed on Any Windows 10/8/7, Mac OS and Linux PC. It’s quick and easy but there’s no fancy GUI for you to play with, and installing Assistant requires you to use the command line. This guide is for educational purposes only. Step 1. Install Python on Windows, Mac or Linux.

VIDEO TUTORIAL:

Steps to install Google Assistant on Windows 10, Mac or Linux

Step 1. Install Python 3 or above on Windows, Linux or Mac

You’ll need to have Python installed no matter whether or not you are using Windows, macOS, or a GNU/Linux distribution. Installation is quick and easy. Follow the steps to install Python,

Once installed, check if Python is working on your machine by opening up a terminal/command prompt and then simply typing “python”. If you see the terminal/command prompt return the current Python version on your computer, then proceed to next step.

Step 2. Configuring The Google Assistant API

Wait a few seconds for the Console to create your new Project. You should see a spinning progress icon in the top right. After it is done creating your Project, you will be brought to your Project’s configuration page.

Click this link to go straight to the Google Assistant API page. Up top, click “Enable.”

Google will warn you that you need to create credentials to use this API. Click “Create credentials” in the top right. This will take you to a setup wizard page where Google helps you figure out what kind of credentials you need to use this API.

Under “where will you be calling the API from”, select “Other UI (e.g. Windows, CLI tool)“. For “what data will you be accessing” select the “User data” circle. Now tap “what credentials do I need?”

Google should recommend that you create an OAuth 2.0 client ID. Name the Client ID anything you want, for example, your name + Desktop. Once done picking a name, click “create client ID.”

Click “done.” There’s no need to click download here as we only need the client secret, which we will download next.

Now under the list of OAuth 2.0 client IDs, you should see the client ID you just made. All the way to the right, click on the download icon to download the client_secret_XXX.json file, where ‘XXX’ is your client ID. Save this file anywhere on your computer, ideally in a new folder called “googleassistant.”

Go to the Activity controls page for your Google account and make sure that “Web & App Activity”, “Location History”, “Device Information”, and “Voice & Audio Activity” are enabled. This is so Google Assistant can actually read you personalized information.

Now that we have created a mechanism for a client in our Windows/Mac/Linux machine, to access the Google Assistant API under our Google account. Next we need to set up the client that will access the Google Assistant API.

Step 3. Install Google Assistant Sample Python Project

Open up a terminal/command prompt window and go through the following steps. First, enter this command:

py -m pip install google-assistant-sdk[samples]

This will start downloading a whole bunch of dependencies and will install it on your system. Wait for it to finish. It takes less than a minute. Next, Edit this command by adding the path to the json file we downloaded earlier in step 2. Then enter the following command in CMD:

This will return a URL and will ask you to visit that URL to authorize the app. So copy and paste it in the browser. Select theGoogle account you used earlier to configure Google Assistant API.

On next page, you need to allow aacess to Google Assistant API. So press Allow and on following page, you will get an access token. Copy it and paste in command line, hit enter.

If everything is good, you will see a message saying, Credentials Saved.

Step 4. Testing the Google Assistant

To test if Google assistant is working on your system or not, type the following command in command line. This will record a 5 seconds audio and play it back to you and if it does, this means Google Assistant has been successfully installed on our System.

Now to you can enter this command to start talking to Google assistant,

python -m googlesamples.assistant

Wait for the CMD to say “Press enter to send a new request”, now hit enter and Start talking to Google Assistant. After you finish giving command, the command line will display what you said and then give you a response like in any Android device. So there you have it, the Google Assistant on a Windows 10, Mac or GNU/Linux Machine.

Conclusion

In starting, it was fun to use it on Windows 10 but soon I got bored and now i don’t use it. It’s not useful in this form but on the brighter side, it opens up the possibilities and we may sooner see desktop apps and browser extensions taking advantage of this functionality in near future. Hope you enjoyed this, please Subscribe to our YouTube Channel and Newsletter, Hit Like and Share your thoughts in the comment down below on Google assistant for Windows, Mac and Linux. I will be back with another interesting tutorial Soon.