How to Setup Google Assistant on Windows


This tutorial is about setting up Google Assistant on your Windows. Yes, it’s now possible and we will tell you How to Setup Google Assistant on Windows. Google Assistant, as the name suggests, is your assistant which act on your Voice commands. All you have to do is to say “OK Google” and then tell Google assistant what you want it to do. Just a few days ago Google launched the Google Assistant SDK which allows Assistant to run on any platform like Windows, MAC or Linux machine using Python.

To setup Google Assistant on Windows you will need to have Python installed on your machine whether its Mac, Linux or Windows, it doesn’t matter. Therefore, install Python on your Windows PC using this Wiki. Once you are done with installation of Python on Windows open command prompt and then simply type python. If you see the terminal/command prompt return the current Python version on your computer, then you’re good to go. But before you start giving commands to your PC we need to enable access to the Google Assistant API. So, keep on reading if you want to know how to setup Google Assistant on Windows.

Let’s start setting up Google Assistant on your Windows.

how to setup Google Assistant on Windows

How to Configure the Google Assistant API

  1. Go to the Google Cloud Platform Console.
  2. Click on the Create Project.
  3. Name the project “My Google Assistant”.
  4. Once your project is created, you will be automatically routed to your Project’s configuration page.
  5. Now go straight to the Google Assistant API page. Click Enable on the top of Google Assistant API page.
  6. Now Google will ask you to create credentials to use this API. To do so click on Create Credentials in the top right corner, this will take you to the wizard where you can create credentials.
  7. On credentials page 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 click on “what credentials do I need?” button.
  8. Now Google will ask you to create an OAuth 2.0 client ID. Once done picking a name, click on “create client ID”.
  9. Under “product name shown to users” enter “My Google Assistant.” Click continue.
  10. Don’t click “Download” yet, here click on “Done”.
  11. Now under the list of OAuth 2.0 client IDs your client ID, which you created earlier, must be listed. Click on the farthest Download button on the right side to download the .json file. Save this file anywhere on your computer.
  12. Make sure that “Web & App Activity”, “Location History”, “Device Information”, and “Voice & Audio Activity” are enabled in Activity Controls Page of your Google account.

Install the Google Assistant Sample Python Project

  1. Open command prompt and enter the below command.
    1. py -m pip install google-assistant-sdk[samples]
  2. Now enter the following command. Please make sure to adjust the paths as you set them.
    1. py -m googlesamples.assistant.auth_helpers –client-secrets path\to\your\
  3. After entering the above command, you will see a response telling you to visit a URL in order to authorize the application. Copy and paste the URL in your browser and hit enter. Select the same Google account in which you created the API.
  4. On the next page you will be given a client’s access token. Copy that token and paste it in command prompt where it says “Enter the authorization code:”.

Test the Google Assistant on Windows PC

  1. To test the MIC type in the below command in command prompt and press enter.
    1. python -m googlesamples.assistant.audio_helpers
  2. Enter this command to begin talking to Google Assistant.
    1. python -m googlesamples.assistant

Now, wait for the command prompt to say “press Enter to send a new request”, then press enter to begin talking to your Google Assistant. If you see warning afterward, ignore it.

This is how to setup Google Assistant on Windows.