TNTBuzz
  • Home
  • Tech
  • How to get Google Assistant on your Windows, Mac, or Linux Machine
Tech Windows

How to get Google Assistant on your Windows, Mac, or Linux Machine

How to get Google Assistant on your Windows, Mac, or Linux

Google Assistant is Google’s resolution to Amazon’s Alexa smart home assistant. Initially only available with restricted functionality in the Google Allo application, Google Assistant later rolled out with the Google Home and Pixel smartphones to convey the overall power of Google’s assistant to customers.

After a couple of months of waiting, smartphones running Android 6.0+ also received Google Assistant, and only some days in the past Google introduced the Google Assistant SDK which permits Assistant to be run on principally any platform. Lately, we can display you the best way to set up Google Assistant onto your Windows, Mac, or Linux gadget using Python.

Observe: at this day and age, that is purely for academic functions. There’s no fancy GUI so that you can play with, and putting in Assistant calls for you to make use of the command line.


Get Google Assistant on your Windows/Mac/Linux Machines

You’ll need to have Python installed regardless of whether or not or no longer you might be the use of Windows, macOS, or a GNU/Linux distribution. Installation is reasonably easy and already well-documented by the Python wiki, so we won’t pass into many information about getting Python up and running for your system.

Once you’ve got Python operating for your device (you’ll be able to verify it’s working via opening up a terminal/command recommended and then simply typing python.) If you see the terminal/command recommended return the current Python model for your laptop, then you’re golden.

Subsequent, sooner than we will be able to set up the essential recordsdata to get Google Assistant operating, we wish to permit get admission to the Google Assistant API in the Google Cloud Platform Console.


Configure the Google Assistant API

What follows are step by step directions strolling you in the course of the procedure to permit the Google Assistant API within the Cloud Platform Console so you’ll be able to get admission to Google Assistant in the course of the Python program. All of those steps are platform unbiased, that means that the stairs are the similar for Home windows, macOS, and GNU/Linux customers.

  1. Go to the Projects page within the Google Cloud Platform Console.
  2. Click on “Create Project” up best.
  3. Identify the Project “My Google Assistant” and click on “Create.”
  4. Wait a couple of seconds for the Console to create your new Project. You should see a spinning progress icon within the top right. After it’s done creating your Project, you’ll be introduced in your Project’s configuration web page.
  5. Click this link to go immediately to the Google Assistant API web page. Up top, click on “Permit.”
  6. Google will alert you that you need to create credentials to make use of this API. Click on “Create credentials” within the top right. This may increasingly take you to a setup wizard web page where Google helps you determine what sort of credentials you wish to have to make use of this API.
  7. Beneath “where will you be calling the API from”, make a selection “Other UI (e.g. Windows, CLI tool)“. For “what data will you be getting access to” make a selection the “User data” circle. Now tap “what credentials do I need?”
  8. Google will have to suggest that you just create an OAuth 2.0 client ID. Identify the Consumer ID anything you want, for instance, your title + Desktop. As soon as performed choosing a reputation, click on “create client ID.”
  9. Beneath “product name shown to users” enter “My Google Assistant.” Click on proceed.
  10. Click on “done.” There’s no wish to click on download right here as we only want the client secret, which we can download next.
  11. Now below the checklist of OAuth 2.0 client IDs, you should see the client ID you simply made. The entire technique to the right, click on at the download icon to download the client_secret_XXX.json file, where ‘XXX’ is your client ID. Save this document anyplace for your laptop, preferably in a new folder referred to as “googleassistant.”
  12. Go to the Activity controls page on your Google account and be sure that “Web & App Activity”, “Location History”, “Device Data”, and “Voice & Audio Activity” are enabled. That is so Google Assistant can actually learn you personalised information.
READ ALSO:  Nokia-branded Android smartphones will launch in first half of 2017

 

We have now created a mechanism for a shopper, in this case our Windows/Mac/Linux system, to access the Google Assistant API below our Google account. Next we wish to arrange the client that may access the Google Assistant API.

Get Google Assistant Sample Python Project

Despite the fact that Google recommends that you just set up Python virtual environments to isolate the Google Assistant SDK and its dependencies from different Python system packages, we’re going to skip this step as it’s not likely that you’ll mess around with this for more than a few mins. You’ll be able to simply go back to the Cloud Platform Console and disable the API if you’re nervous about the potential for different methods to access your Google account.

Open up a terminal/command prompt window and go through the following steps. First, enter this command:

py -m pip set up google-assistant-sdk[samples]

You will have to see a complete bunch of dependencies being downloaded and installed while you input this command. Those are needed for the pattern Python project to work. Watch for it to complete.

As soon as it’s done, subsequent input the next command (be sure to alter the path):

py -m googlesamples.assistant.auth_helpers --client-secrets pathtoyourclient_secret_XXX.apps.googleusercontent.com.json

Within the command recommended, you’ll see a reaction telling you to visit a URL with a purpose to authorize the applying.

READ ALSO:  Reliance Jio's 'Dhan Dhana Dhan' offer - things that have changed

Copy and paste this URL into your browser. Select the same Google account that you just used to configure the Google Assistant API. At the subsequent web page, you’ll see a textual content field that accommodates your client’s Access Token.

Copy that Access token and paste it into the command prompt where it asks you for the authorization code. If done correctly, you’ll see a response that your credentials have been stored.


Check the Google Assistant

The very first thing you’ll need to take a look at is whether or not or not Google Assistant is in a position to record audio out of your microphone. Input the following command right into a command prompt, which is able to document five seconds of audio and play it back to you:

python -m googlesamples.assistant.audio_helpers

For those who hear your audio performed back to you, then enter this command to start speaking to Google Assistant:

python -m googlesamples.assistant

Watch for the command prompt to say “press Enter to send a new request”, then press Enter to begin speaking to Google Assistant. After you’re done talking, the command prompt will show a transcript of what you simply said and then play back the response. For those who see a caution afterwards, simply ignore it.

READ ALSO:  Google has chosen Best Apps and Games for this Fall

Have a laugh playing with Google Assistant for your Windows, macOS, or GNU/Linux system! I performed with it for just a few mins before getting bored with it. It’s no longer in particular helpful on this layout, however it is a very fast demonstration of the possibilities that the new Google Assistant SDK represents. Perhaps we might see desktop apps or browser extensions taking advantage of this functionality within the near future.

Related posts

Leave a Comment