Primarily available on mobile phones and smart home devices, Google Assistant is a virtual assistant that serves many purposes. Much to our surprise, Google Assistant can now have one-on-one conversations with a user and interact with them without much delay. Users have to interact with this artificial intelligence device through voice commands, though it also supports keyboard inputs. Also, the performance of the device can be amplified by third-party applications developed by various programmers.
In this guide, we will explain how you can install and run Google Assistant on Windows, Mac or Linux PC.
Steps to install and Run Google Assistant on Windows PC, macOS or Linux
Step 1. Install Python 3 or above on Windows, Linux, or Mac
Whichever operating system you wish to install Google Assistant on, you are required to have Python 3 installed on your system. Follow the instructions given below to install Python 3 on your system.
- Download the Python 3 setup file for Windows or Mac system from the official website.
- Run the file.
- Select Customised Installation from the options and click Next.
- Make sure you select the options that have been selected in the screenshot given below.
- Follow along with the further instructions and you will be good to go.
To install Python 3 on Ubuntu Linux machines, run the following commands in the Terminal window
sudo apt-get update $ sudo apt-get install python3.6
Then verify the Python version installed on your machine via following command,
Step 2: Configure Google Assistant API
To configure Google Assistant API, kindly follow the below-given instructions. These instructions are independent of the platforms, meaning they are the same for Windows, Mac as well as Linux PC.
- In the Google Cloud Platform console, go to the Projects page.
- Select Create Project.
- You can give any name of your choice to the project here. Once done, click on the Create button.
- Once the loading is complete, you will be taken to a configuration screen. You will now have to go to this link that will lead you to the Google Assistant API screen.
- Click on Enable.
- To use Google Assistant API, there must be some credentials created. On the top-right corner of the screen, click on Create Credentials.
- Choose Other UI for “Where Will You Be Calling From” option and User Data for “What Data Will You Be Accessing”.
- Click on “What Credentials Do I Need?”
- It is recommended that you create an OAuth2.0 client ID. Name it anything you like and then hit Create Client ID.
- Under the option “Product Name Shown To Users”, enter the name you chose in Step 3 and click ‘Continue‘
- Click on Done.
- There would be a list of all the OAuth2.0 client IDs available. Out of them, download the one with your client ID in its name.
- You must ensure that the following options are enabled in the Activity Controls page of your Google account:
- Web and App Activity
- Location History
- Device Information
- Voice and Audio Activity
Step 3: Google Assistant Sample Python Project
To install a sample python project, you must open the command prompt window (or terminal) and follow these instructions:
- Enter this command
py -m pip install google-assistant-sdk[samples]
- When you press Enter after typing the above command, you will see various dependencies being downloaded and installed on your computer. Wait for the process to finish.
- Next, modify this command as per your scenario and press Enter:
py -m googlesamples.assistant.auth_helpers --client-secrets path\to\your\client_secret_XXX.apps.googleusercontent.com.json
- To grant authorization to the application, you must visit the URL given in the response. Copy and paste this URL to your computer’s browser.
- Select the name of your Google account that you configured in Google Assistant API.
- On the following page, you will see your Client Access Token in a text box. Copy this token and paste it in the command prompt/terminal window when it asks for the authorization code.
If you have followed the above steps correctly, you will be prompted that your credentials have been saved.
Step 4: Run Google Assistant on Windows, Linux or macOS
If you have reached till here, congratulations! You have set up the Google Assistant either on Windows, Mac, or Linux. Now, it is time for us to test it. The first and the foremost thing that one would want to test in the Google Assistant is whether it is able to record your voice or not. To do just that, enter the below-given command into the command prompt/terminal window. What it will do is that it will record your audio for 5 seconds and then play it back. So cool, right?
python -m googlesamples.assistant.audio_helpers
If the above command records and plays back your voice for 5 seconds, enter this command to start communicating with the Google Assistant:
python -m googlesamples.assistant
Wait for the process to finish until you see the text – “press Enter to send a new request”. You may now hit the Enter key on your keyboard and begin conversing with the AI system.
Whenever you feel the need to stop talking, you may stop and the command prompt will have displayed a transcript of whatever you just spoke. Also, it will play it back as its response. Now go and have a blast with your virtual friend.
Video Guide to Install Google Assistant on Windows, macOS, or Linux
Another way to Install and Run Google Assistant on MacBook or iMac
You may also run Google Assistant on macOS with the help of an app called Mac Assistant, which is still in the beta development. But it works great! Moreover, you can contribute to this project development at GitHub.
Step 1. Download the Mac Assistant latest release here.
Step 2. Double-click to run it. When you see ‘New app from unidentified developer……..’ and you are not able to open it then go to System Preferences>Security & Privacy>General tab.
Click the Padlock and enter the password when prompted. Then click the ‘Open Anyway’ button (see screenshot)
Step 3. Once you are able to run it, you will see a new icon in the macOS menu bar.
Step 4. Click on the icon, it will open a sign in box (only first time). Use your Gmail credentials to log in and then click ‘Allow’
Step 5. From now when you click the icon, it will open a box with a microphone. Click on the microphone and start asking Google Assistant whatever you want to. You can also trigger Google Assistant by pressing the left command key two times
Step 6. When finished speaking, Google Assistant on your macOS will respond with an appropriate reply. If it doesn’t click on the voice modulation bar after you finish speaking
You can ask her anything, for instance,
“What’s the weather today”
“Who is the president of United States” etc.
As of now, it’s still in beta (development) stage. So this Google Assistant can’t display anything visually like it does on our Android devices or like Siri displays links and stuff like that. Also, in case you want to install it on Windows, refer to this video.
P.S.: Google Assistant runs better in macOS than Windows. Thanks to Mac Assistant.
In the beginning, it was fun to run Google Assistant 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.