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:
-
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. -
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. -
Open Google Cloud Platform in a web browser (preferably Chrome) and select Create Project. Sign in with your Google account if prompted.
-
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. -
Open Google Assistant APIs in another browser tab, then select Enable to enable the Google Assistant API for your project.
-
Select Create Credentials.
-
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.
-
Select Set up consent screen.
-
Change the Application Type to Internal, type WinGoogleAssistant in the Application name field, then scroll to the bottom of the screen and select Save.
-
Select Create credentials, then select Help me choose. On the next screen, select the same options as you did in step 7 above.
-
Type WGAcredentials in the Name box under Create an OAuth 2.0 client ID, then select Create OAuth client ID.
-
Select Done after the option to download the credentials displays.
-
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.
-
Open the Windows Command Prompt and enter the following:
py -m pip install google-assistant-sdk[samples]
-
Wait for the installation to complete, then enter:
py -m pip install --upgrade google-auth-oauthlib[tool]
-
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.
-
Click in the file name field and press Ctrl+A to select all, then press Ctrl+C to copy the file name.
-
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.
-
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.
-
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.
-
Choose Allow to give the application access to Google Assistant.
-
Next, you should see a long string of letters and numbers. Click on the box to the right of these to copy the characters.
-
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.
-
To test that things are working as expected, enter:
py -m googlesamples.assistant.grpc.audio_helpers
Your computer should record 5 seconds of audio and play it back to you.
-
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.
-
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
:max_bytes(150000):strip_icc():format(webp)/099_google-assistant-on-windows-4628292-628284a71dd94e1b99c10fbd1ca60a52.jpg)
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, enter chrome://flags and press Enter.
-
Enter assistant in the search box that displays on the page.
-
In the results below, next to either Enable Google Assistant or Enable Google Assistant with hardware-based hotword, select the dropdown Default and then select Enable.
-
Select the Restart Now button in the lower right after you enable Google Assistant.
-
Then, go to Settings.
-
Scroll down to Search and Assistant and select Google Assistant.
-
Make sure the slider is set 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.)
Comments
Post a Comment