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.

Google and Microsoft have not yet created a simple way to get Google Assistant working on Windows as of May 2019. While it is possible, the process is intended for voice application developers, not people who simply want to use Google Assistant as an alternative to Microsoft’s voice assistant, Cortana. (In contrast, Microsoft and Amazon have worked together to make Alexa, Amazon’s voice assistant, work with Cortana relatively easily. See “How to Use Alexa and Cortana Together” to learn how to set this up.)

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 Windows or macOS computer. (The Google Home Mini typically costs $49.) You also might install the Google Assistant app (for Android or iOS) on a phone or tablet. Or, for a more, do-it-yourself experience, buy and build the Google Voice Kit (typically, less than $60). All of those are officially supported ways to access Google Assistant.

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.)

In the future, Google may add similar Google Assistant capabilities to the Chrome browser on Windows. Until then, the following steps will allow you to install and configure a basic version of Google Assistant on a PC running a current version of Windows 10.

For the following steps to work, you’ll need the ability to install software on your Windows system. You’ll also need a Google account to create a Google Cloud Platform project for Google Assistant. Before you begin, you’ll also need to enable access to Voice & Audio Activity for your Google account. (Often, this is already on, but you can enable it, along with other access to information at

  1. Download and install Python. Double-click the downloaded file to run it, then check the box next to “Add Python 3.7 to PATH” then select Install Now. Allow the app permission to install. It may take a few minutes to complete. When the installation is finished, click “Close”.

    Screenshot of showing Download link
  2. In Windows, open Windows file explorer, and navigate to the main C: drive directory. Select the new folder icon and create a new folder named “GoogleAssistant”.

    Screenshot of Windows File Explore, create new folder in C: directory
  3. In your browser (preferably Chrome), open Sign in with your Google account, if prompted.

    Screenshot of Google Cloud Platform page, showing Create Project button
  4. Select Create Project, then type in “WinGoogleAssistant” for a project name.

    After you type the project name in the box, look immediately below the box. Write down the Project-ID. You will need this later. Typically, the Project-ID might consist of two words and a string of numbers, separated by dashes.

    When you have written down the Project-ID, select Create. (If you select a different project name, substitute that name in future steps.) Wait for the system to create the project.

    Screenshot of Google Cloud Platform New Project screen
  5. Open another browser tab, and go to, then select Enable. This enables the Google Assistant API for your project.

    Screenshot of Google Assistant API with ENABLE button displayed
  6. Next, choose Create Credentials.

    Screenshot of Assistant API screen with Create Credentials button visible

    On the “Add credentials to your project” screen, choose the following three responses:

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

    Then select the What credentials do I need? button.

    Screenshot of prompt to
  7. On the “Set up OAuth consent screen” that appears next, select Set up consent screen. Change the Application Type button 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
  8. Select Create credentials in the APIs Credentials box displayed, then select Help me choose. Again, select the same options as in step 5 above.

    Screenshot of API Credentials, with drop down. Choose
  9. In the Name box for the “Create an OAuth 2.0 client ID” that displays, type “WGAcredentials”, then select the blue Create OAuth client ID button.

    Screenshot of Google API

    Choose Done after the option to download the credentials displays.

    Screenshot of completed Add credentials to your project page, with Done button displayed.
  10. To the right of the credentials you just created, select the down-pointing arrow, which should display “Download JSON” when you hover over the option. Select it to download the file. Navigate to the “GoogleAssistant” folder you created earlier and save the JSON file in that folder.

    Screenshot of created OAuth 2.0 client ID credentials, ready to download
  11. Select the Start Menu, then Windows System, then Command Prompt. This will open a command line window. Type:

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

    Wait for the installation to complete.

    Screenshot of Command Prompt instructions to install Google Assistant SDK
  12. Next, install the credentials tool by typing:

    py -m pip install --upgrade google-auth-oauthlib[tool]

    Screenshot of Command Prompt to install Google OAuth tool
  13. Open Windows file explorer, navigate to the JSON file you saved earlier (i.e., in the GoogleAssistant folder you created), and right-click on it, then select Properties.

    Screenshot of right-click in Windows File Explorer to view Client_Secret properties

    Click in the file name field, press Ctrl-A to select all, then Ctrl-C to copy the file name.

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

    google-oauthlib-tool --client-secrets C:\GoogleAssistant\ --scope --save --headless

    Screenshot of Command Prompt command to add Google OAuth client secret

    Type, then paste, then type

    To type this in correctly, you will want to type:

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

    Then press Ctrl-V to paste in the file name you copied in step 12, the continue typing with a space, followed by

    --scope --save --headless

  15. You’ll next see a URL displayed, with a prompt to “Enter the authorization code:”. Select the entire URL, starting with the “https://”. Press Ctrl-C to copy the URL.

    Screenshot of Command Prompt screen with long URL (https://) selected
  16. Open a new browser tab, and paste the copied URL into the omnibox. 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
  17. Choose Allow to give the application access to Google Assistant.

    Screenshot of page shows
  18. 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
  19. Switch back to the Command Prompt window, and press Ctrl-V to paste the authorization code into the prompt. Press the Enter key. You should see a message that the “credentials saved”.

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

    py -m googlesamples.assistant.grpc.audio_helpers

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

    Screenshot of Command Prompt typed command to test Google Assistant
  21. Next, type the following:

    cd C:\GoogleAssistant

    Then type:

    googlesamples-assistant-devicetool --project-id the-project-id-you-wrote-down-earlier register-model --manufacturer “Assistant SDK developer” --product-name “Assistant SDK light” --type LIGHT --model “WinGAsst”

    Be sure to replace “the-project-id-you-wrote-down-earlier” with the Project ID words and letters that displayed when you created your Cloud Platform project.

    Screenshot of Command Prompt with Google Assistant devicetool code to create device
  22. To initiate the Google Assistant with push to talk capabilities, type:

    py -m googlesamples.assistant.grpc.pushtotalk --device-model-id “WinGAsst” --project-id the-project-id-you-wrote-down-earlier

    Screenshot of Command Prompt with active Google Assistant connection on Windows, with push-to-talk

    Again, replace “the-project-id-you-wrote-down-earlier” with the Project ID string that displayed when you created this project.

  23. That’s it!

Now, you 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.

Hopefully, a future Chrome or Google software release will make getting access to Google Assistant on Windows as easy as it is today on Chrome OS, Android, or iOS.