How to Get Google Assistant on Windows, macOS and Linux

Google Assistant – Google’s answer to all the AI assistants claiming to be the best, is quite simply the best one there is right now. It’s not perfect, not by far, but it does the job much better than the other options. Which is why, when Google released Google Assistant on every Android phone with Android 6.0 and above, it was such a huge deal. Which is why it’s exciting that you can now get the Google Assistant (sans the UI) on Windows, Mac and Linux as well. So, if that excites you, and the fact that “sans the UI” means you’ll be using the Terminal doesn’t scare you, here is how to get Google Assistant on Windows, Mac, and Linux systems:

NoteThis method allows a user to get access to Google Assistant using the Terminal (Command Prompt on Windows), and there is no GUI involved. However, all the commands work perfectly fine. 

Prerequisites for the Google Assistant

Before you can get to running the Google Assistant service (thanks to Google releasing the Google Assistant API), you need to know a few things, and set up a few others:

  • You will need to use the Terminal on macOS or Linux, and the Command Prompt on Windows, to set up and run the Google Assistant.
  • You’ll need to have Python 3 installed on your system. While most Mac, and Linux systems come with Python preinstalled, it’s usually version 2.x. So, make sure you go to the Python website, and download Python 3.x for the purposes of this tutorial.

Setting Up the Google Assistant API

Before you can use Google Assistant on your Windows, Mac, or Linux computer, you’ll have to configure the Google Assistant API. Simply follow the steps given below:

  • Go to “Projects” in the Google Cloud Platform Console website, and click on “Create Project”.

How to Get Google Assistant on Windows, macOS and Linux

  • Give your project an appropriate name. I used “My Google Assistant” as the name, but “Way Better than Siri” will work just as well. Then, click on “Create”.

How to Get Google Assistant on Windows, macOS and Linux

  • The Cloud Platform Console will take some time to set up your project, and you’ll be able to see a progress circle in the top right. Once done, you can click on the “bell icon”, and then on the notification regarding your project.

How to Get Google Assistant on Windows, macOS and Linux

  • In the page that opens up, click on “API Manager”.

How to Get Google Assistant on Windows, macOS and Linux

  • Go to “Library”, and then search for “Google Assistant”.

How to Get Google Assistant on Windows, macOS and Linux

  • Click on the “Google Assistant API” that shows up in the results, and then click on Enable.

How to Get Google Assistant on Windows, macOS and Linux

  • Google will tell you that you may need credentials to use the API. Simply click on “Create credentials“.

How to Get Google Assistant on Windows, macOS and Linux

  • In the form that opens up, choose “Other UI (eg Windows, CLI)” under “Where will you be calling the API from?“, and select “User Data” in “What data will you be accessing?“. Then click on “What credentials do I need?“.

How to Get Google Assistant on Windows, macOS and Linux

  • Create a client ID. You can give it any name that you want. Once done, click on “Create client ID“.

How to Get Google Assistant on Windows, macOS and Linux

  • In the next step, use the name of your project in the “Product name as shown to users“, and then click “Continue”.

How to Get Google Assistant on Windows, macOS and Linux

  • You’ll get the option to download the credentials. Click on “Done”. We’ll download the credentials later.

How to Get Google Assistant on Windows, macOS and Linux

  • Go to Activity Controls, and ensure that all the toggles are turned on. This is required for the Google Assistant to provide personalized responses.

How to Get Google Assistant on Windows, macOS and Linux

  • In the next screen, you’ll be able to see the client ID you created. Click on the download icon at the very right of the screen. This will download a JSON file to your computer. Save it somewhere you can easily get to. I saved it at “/Users/akshaygangwar/assistant/“.

Install Google Assistant Sample Project

  • Launch the Terminal (Command Prompt on Windows), and type the following command:
    python3 -m pip install google-assistant-sdk[samples]

How to Get Google Assistant on Windows, macOS and Linux

  • Once the command completes, type the following command:
    python3 -m googlesamples.assistant.auth_helpers --client-secrets "path_to_the_downloaded_JSON_file"

How to Get Google Assistant on Windows, macOS and Linux

  • You will get a URL as the output in the Terminal. Navigate to this URL in your browser, copy and paste the confirmation code from the webpage into the Terminal, and press Enter.

Use Google Assistant on Windows, Mac and Linux

Now that you’ve done all the required set up, it’s time to test the Google Assistant, and begin using it.

  • Launch Terminal and execute the following command:
    python3 -m googlesamples.assistant.audio_helpers
    This will start a 5 second audio recording, which will then be played back. If you can successfully hear the playback, you can use the Google Assistant.

How to Get Google Assistant on Windows, macOS and Linux

  • To use Google Assistant on Windows, Mac and Linux, just use the following command:
    python3 -m googlesamples.assistant

How to Get Google Assistant on Windows, macOS and Linux

You can then start using Google Assistant on Windows, Mac and Linux. The Google Assistant API supports every command that Google Assistant supports on Android, and Google Home.

SEE ALSO: 10 Cool IFTTT Recipes For Google Assistant

Get Google Assistant on Your Windows, Mac or Linux Computer

You can follow these steps to get Google Assistant on your Windows, Mac or Linux computer. While there is no GUI, and you’ll have to interact with the Google Assistant using the Terminal (or Command Prompt), it still is a fun way to get Google Assistant working on your computer. Plus, Google’s opening the Assistant API is an awesome thing, because developers can now integrate it into their apps and create awesome experiences… hopefully. All that remains to be seen, however.

comment Comments 16
  • Julien Dup says:

    Good afternoon and Happy New Year !!

    I’m trying to get Google Assistant working properly on my laptop. Actually it is working properly but not with the language that I want. The major issue that I have is when I type
    googlesamples-assistant-hotword –project-id myprojectid –device-model-id mymodel
    I get the error in the title.

    But when I only enter
    googlesamples-assistant-hotword –device-model-id mymodel
    it works like a charm ! Of course I get the message “Your device is not registered blablabla”.
    I already manually registered it with the tool provided by Google in the terminal.

    I do not know how to do I searched the web for every little solutions but none of them is working.

    Thanks for you help and sorry for my English 🙂

  • Prince says:

    python3 -m pip install google-assistant-sdk[samples]
    /usr/bin/python3: No module named pip

  • omkar patil says:

    after entering the command-
    python3 -m pip install google-assistant-sdk[samples]
    I’m getting-
    Command “python setup.py egg_info” failed with error code 1 in C:\Users\omkar\AppData\Local\Temp\pip-build-an093bw8\googleapis-common-protos\

    please help

    • eric says:

      I’m getting the same problem

      • Mark says:

        I have the same error
        py -m pip install google-assistant-sdk – suceeds
        but then
        py -m googlesamples.assistant.auth_helpers –client-secrets “D:\Google Drive\Assistant” – fails
        py -m google.assistant.auth_helpers –client-secrets “D:\Google Drive\Assistant” – doesn’t work either

  • Pratik Rajgor says:

    py -m pip install google-assistant-sdk[samples] this command say invalid syntax……what to next?????

    • Superhero says:

      Just replace py by python3

  • vijay says:

    IT says “press enter to send a new request” insted of that, can we just say ok google to invoke recording mode? thanks

  • Manish says:

    I will try Google Assistant for my windows. Thank you for sharing this article. Informative!!

  • Rahul singh says:

    Can i use Google Assistant in my Samsung galaxy s5 phone?

  • Darsan says:

    there is miner mistake of you.
    for windows pc command is
    “py -m pip install google-assistant-sdk[samples]” instead of python3 -m pip install google-assistant-sdk[samples]

    • Vasu says:

      how to write 2 command
      i am writing these command in python

  • Darsan says:

    all process went successful but from
    “python3 -m pip install google-assistant-sdk[samples]” in does not worked
    in my windows 10 it says “python3 is not recognized as an internal or external command,

    waiting for your reply

    thanks.

  • Vibhanshu Lal says:

    Can’t complete- Install Google Assistant Sample Project.

    Unable to give command in command prompt. Syntax Error.

    • Pratik Rajgor says:

      Me too…..facing same problem!!!

      • coolman101 says:

        I know.
        It says an error: python3 : The term ‘python3’ is not recognized as the name of a cmdlet, function, script file, or operable program.
        Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
        At line:1 char:1
        + python3 -m pip install google-assistant-sdk[samples]
        + ~~~~~~~
        + CategoryInfo : ObjectNotFound: (python3:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

Leave a Reply