How To Run Voice Activated Google Assistant on Windows PC

How To Run Voice Activated Google Assistant on Windows PC

Google Assistant is a Google’s voice-controlled smart virtual assistant powered by artificial intelligence. As of today, there are many AI assistant out there such as Amazon Alexa, Siri, Cortana, etc but Google Assistant is one of the best available on the market.

Google Assistant is available on nearly every Android phone with Android 6.0 and above. But the only problem with Google Assistant is there is no desktop version available. However, thanks to Google Assistant SDK which allows running assistant on any platform such as Windows, MAC and Linux as well.

 

 

In order to run voice-activated Google Assistant on windows PC, you need to perform command line instruction which are the only possible way to get it on Windows PC.

 

Prerequisites:

Before going to install Google Assistant on windows pc, you should know a few necessary things and set up a few others.

  • On your Windows computer you will have to use Command Prompt, and on your macOS, you need Terminal to set up Google Assistant.
  • You must have Python 3 installed on your system. However, Mac and Linux system come with Python preinstalled. But if you are windows user then you need to install Python 3 on your system.

 

Install Python 3.x On Windows

First, download Python 3.x on your PC.

Double click on the python.exe file to run the setup.

Checkmark Add Python 3.7 to PATH and click on Customize Installation.

 

 

Make sure all optional features are checked and click on Next button.

 

 

In next screen make sure Add Python to environment variables option is checked.

 

 

Finally click on Install button, then wait for few seconds to install python on your PC.

Once you successfully installed Python restart your PC.

 

Let’s check Python is installed or not in your system

Open Command Prompt as admin and type the following command and hit the enter button.

Python

If Python is installed then above command will return the current Python version installed on your computer.

 

 

How To Install Google Assistant on Windows 10

 

Step 1: Configure Google Assistant API

First, visit the Google Cloud Platform Console on your Windows computer.

Next, click on the Create Project button.

 

 

Type a suitable name for your project and click on Create.

 

 

Now wait till your project is created, once created click on the bell icon and select your project.

 

 

In your project page click on APIs & Services then select Library.

 

 

Here search for Google Assistant in the search console.

 

 

Select Google Assistant API and click on Enable button.

 

 

At right-hand side select Credentials and click on Create Credential button.

Choose below answers in Add credentials to your project screen.

  1. Which API are you using?

Ans: Google Assistant API

  1. Where will you be calling the API from?

Ans: Other UI (e.g. Windows, CLI tool)

  1. What data will you be accessing?

Ans: User data

Once you answer all questions click on What credentials do I need?.

 

 

In the next screen enter the name of Client ID and click on Create OAuth Client ID.

 

 

Select your email address and enter product name shown to the user, click on Continue.

 

 

You have the option to download credentials, just click on it to download or you can also download this later.

This will automatically download JSON file to your system and save it somewhere you can easily access it.

 

 

After download click on Done & open Activity controls from here.

Toggle on all activity controls and go back to Credentials.

 

 

Step 2: Install Google Assistant on Windows PC

Open Command Prompt as admin and type the following command and hit enter after each one.

 

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

pip install –upgrade google-auth-oauthlib[tool]

 

 

Above command will download the required dependencies which helps to run Google Cloud project. This process will take little bit of more time based on your internet speed.

 

google-oauthlib-tool –client-secrets path/to/XXXXX.json –scope https://www.googleapis.com/auth/assistant-sdk-prototype –save –headless

 

Change “path/to/XXXXX.json” with the actual path and name of your JSON file which you downloaded before.

 

 

Once you run above command you will get URL as result just copy it and past it on your browser.

Select you Google account and you will get authentication code.

 

 

Copy authentication code and paste it into command prompt and hit enter button.

 

Step 3: Testing Google Assistant

Turn ON your system Speakers

After you install Google Assistant on your system first you need to check whether or not Assistant able to record audio from microphone.

To test it run the following command in cmd and it will record 10 seconds of audio and play it back to you.

python -m googlesamples.assistant.audio_helpers

 

Once test successfully complete the audio test you can move to the next step.

python -m googlesamples.assistant

 

 

After run above command wait for few seconds till command prompt say “press enter to send a new request” and hit enter button. In case if you see any warning then simply ignore it.

That’s it Google Assistant successfully installed on your windows PC. The best part of Google Assistant API is support all command that Google Assistant supports on Google Home and Android device.

Make sure to start using Google Assistant first you need to wake up it using wake command.

 

 

 

Techie5eX

Techieleaf Latest Technology Tips and Tricks. If you have any questions and queries then you may Contact Us. Email : contact@techieleaf.net

Leave a Reply

Your email address will not be published. Required fields are marked *