How to Get Google Assistant for PC

Hate Cortana? Try OK, Google instead

Photo of Dell Windows laptop screen, showing Google Assistant browser window on left, and Command Prompt code running Assistant on the right.

While Microsoft and Amazon have collaborated to make Alexa and Cortana work together, there is no simple way to get Google Assistant for Windows. However, if you want to use Google Assistant as an alternative to Microsoft’s default voice assistant, there is a way if you have a Chromebook or Windows 10 PC.

Instructions in this article apply to devices running Windows 10 or Chrome OS.

How to Get Google Assistant for PC on Windows

If your goal is easy access to Google Assistant, your best bet is to purchase a Google Home device and set it up next to your computer. You can also install the Google Assistant app (for Android or iOS) on a phone or tablet. For a more do-it-yourself experience, buy and build the Google Voice Kit.

If you're determined to install Google Assistant on your PC, you must first enable access to Voice & Audio Activity for your Google account. You’ll also need a Google account and the ability to install software on your Windows system. To get started using Google Assistant:

  1. Download Phython for Windows and install it on your PC.

    Make sure to check the box next to Add Python 3.7 to PATH before you select Install Now. This step essential for getting Google Assistant up and running.

    Download Python for Windows from Python.org
  2. Open Windows File Explorer and navigate to the main drive directory (usually C:), then select the New Folder icon and create a new folder named GoogleAssistant.

    Don't include a space in the folder name. This will be important in future steps.

    Screenshot of Windows File Explore, create new folder in C: directory
  3. Open Google Cloud Platform in a web browser (preferably Chrome) and select Create Project. Sign in with your Google account if prompted.

    Screenshot of Google Cloud Platform page, showing Create Project button
  4. Enter WinGoogleAssistant as your project name, then write down the Project-ID underneath. When you have written down the Project-ID, select Create.

    You will need the Project-ID later to use Google Assistant. Typically, the Project-ID consists of two words and a string of numbers separated by dashes.

    Screenshot of Google Cloud Platform New Project screen
  5. Open Google Assistant APIs in another browser tab, then select Enable to enable the Google Assistant API for your project.

    Screenshot of Google Assistant API with ENABLE button displayed
  6. Select Create Credentials.

    Screenshot of Assistant API screen with Create Credentials button visible
  7. On the Add credentials to your project screen, choose the following three responses:

    • For Which API are you using? choose Google Assistant API.
    • For Where will you be calling the API from? choose Other UI (e.g., Windows, CLI tool).
    • For What data will you be accessing? choose User data.

    Select What credentials do I need? when finished.

    Set up credentials for your Google Cloud Platform project.
  8. Select Set up consent screen.

    Screenshot of prompt to
  9. Change the Application Type to Internal, type WinGoogleAssistant in the Application name field, then scroll to the bottom of the screen and select Save.

    Screenshot of OAuth consent screen options, with INTERNAL selected, and Application name as
  10. Select Create credentials, then select Help me choose. On the next screen, select the same options as you did in step 7 above.

    Screenshot of API Credentials, with drop down. Choose
  11. Type WGAcredentials in the Name box under Create an OAuth 2.0 client ID, then select Create OAuth client ID.

    Screenshot of Google API
  12. Select Done after the option to download the credentials displays.

    Screenshot of completed Add credentials to your project page, with Done button displayed.
  13. Select the down arrow to the right of the credentials you just created. It should display Download JSON when you hover over the option. Save the JSON file in the Google Assistant folder you created in step 2.

    Screenshot of created OAuth 2.0 client ID credentials, ready to download
  14. Open the Windows Command Prompt and enter the following:

    py -m pip install google-assistant-sdk[samples]
    Screenshot of Command Prompt instructions to install Google Assistant SDK
  15. Wait for the installation to complete, then enter:

    py -m pip install --upgrade google-auth-oauthlib[tool]
    Screenshot of Command Prompt to install Google OAuth tool
  16. Open Windows File Explorer and navigate to the JSON file you saved earlier (i.e., in the Google Assistant folder you created). Right-click the file and select Properties.

    Screenshot of right-click in Windows File Explorer to view Client_Secret properties
  17. Click in the file name field and press Ctrl + A to select all, then press Ctrl + C to copy the file name.

    Screenshot of detailed client_secret file name properties
  18. Switch back to the Command Prompt window and type:

    google-oauthlib-tool --client-secrets C:\GoogleAssistant\

    Then, press Ctrl + V to paste in the file name you copied in the last step. Press the space bar, and then type:

    --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless

    Finally, press Enter.

    Screenshot of Command Prompt command to add Google OAuth client secret
  19. You’ll next see a URL displayed with a prompt to Enter the authorization code. Highlight the entire URL, starting with https://, and press Ctrl + C to copy the URL.

    Screenshot of Command Prompt screen with long URL (https://) selected
  20. Open a new browser tab and paste the copied URL into the URL field. Select the same Google account you used earlier to create credentials.

    Screenshot showing page that appears after you paste the link into your browser omnibox
  21. Choose Allow to give the application access to Google Assistant.

    Screenshot of page shows
  22. Next, you should see a long string of letters and numbers. Click on the box to the right of these to copy the characters.

    Screenshot of an authorization code, with option to click on an icon to copy the code
  23. Switch back to the Command Prompt window, press Ctrl + V to paste the authorization code into the prompt, and then press Enter. You should see a credentials saved message.

    Screenshot of Command Prompt screen after authorization code is pasted. Shows message
  24. To test that things are working as expected, enter:

    py -m googlesamples.assistant.grpc.audio_helpers

    Your computer should should record 5 seconds of audio and play it back to you.

    Screenshot of Command Prompt typed command to test Google Assistant
  25. Retrieve the Project-ID that you wrote down in step 4 (the letters and numbers that displayed when you created your Cloud Platform project), then type the following in Command Prompt window and press Enter:

    cd C:\GoogleAssistant

    Next, type the following:

    googlesamples-assistant-devicetool --project-id

    Press the spacebar and type your Project-ID, then press the spacebar again and type:

    register-model --manufacturer “Assistant SDK developer” --product-name “Assistant SDK light” --type LIGHT --model “GA4W”

    Finally, press Enter to finish the set up process.

    Install Google Assistant on Windows from the Control Prompt.
  26. To initiate the Google Assistant with push to talk capabilities, type the command below followed by a space and your Project-ID:

py -m googlesamples.assistant.grpc.pushtotalk --device-model-id “GA4W” --project-id
Activate voice commands for Google Assistant on Windows.

You now have a working demo of Google Assistant on your Windows system. With this configuration, after you press Enter, you can ask Google Assistant questions directly. You don’t have to say the traditional “OK, Google” command. Instead, just press Enter while the program is active, then speak.

Google Assistant for Windows doesn't have all of the capabilities that Cortana offers for navigating Windows, but you can ask it almost any question and get an answer if you're connected to the internet.

Don't lose your Project-ID because you will need it each time you want to activate Google Assistant from the Command Prompt. You can always go to your Google Cloud projects to view it.

How to Get Google Assistant for Chromebook

If you have a Chromebook or Chrome OS device, you can enable Google Assistant. In the browser omnibox, go to chrome://flags, type assistant in the search box that displays on the page, then next to the “Enable Google Assistant” option, choose Enable from the drop-down menu that appears. Select the Restart Now button in the lower right after you enable Google Assistant. Then, go to chrome://settings, and scroll down to “Search and Assistant”, select Google Assistant, move the slider for Assistant to “on”. Enable the “OK Google” setting to allow the system to listen for and respond to that voice command. (Adjust any other options, as desired.)