就像Microsoft Cortana和Amazon 的 Alexa一样,您也可以使用Google Assistant for PC。但是,没有简单的方法可以开始访问PC版 Google 智能助理(Google Assistant);您始终可以以稍微间接的方式使用它,但适用于Windows 11/10 PC 和Chromebook。在这篇文章中,我们将引导您了解如何在Windows 11/10上设置Google Assistant。
在开始之前,您需要先为您的Google 帐户启用(Google Account)语音(Voice)和音频活动(Audio Activity)。
就是这样:
Google
Manage your Google Account
At the top, tap Data & personalization.
Under Activity controls, tap Web & App Activity.
Check or uncheck the box next to Include audio recordings to turn the setting on or off.
关闭录音设置后,即使您已登录,来自与Google 搜索(Google Search)、助理(Assistant)和地图(Maps)交互的语音输入也不会保存到您的Google 帐户(Google Account)。如果您关闭录音设置,之前保存的音频没有被删除。您可以随时删除录音。
有 PC 版 Google 助理吗?
是的,可以通过非官方客户端在Windows PC上使用(Windows PC)Google Assistant 。该客户端可让您使用 Google 虚拟助手的许多功能。它就像您的个人 Google 为您做所有事情。
(Set)在Windows 11/10上设置Google 助理(Google Assistant)
要安装适用于Windows 11/10Google Assistant,您需要在 Windows PC 上下载(download)并安装Python 。确保选中Add Python 3.8 to PATH旁边的复选框。
安装完 Python(Python) for Windows后,继续如下:
1) 打开Windows Explorer ,在(Windows Explorer)C: Drive中创建一个新文件夹,并将其命名为 GoogleAssistant。
2) 现在,在您的网络浏览器中,打开(open)Google Cloud Platform 并选择Create Project。如果它要求您登录(Sign),请使用您的Google帐户凭据并登录。
3) 使用WinGoogleAssistant 命名您的项目。您会在项目名称下看到一个 项目 ID ;( Project ID)将其记在某处并妥善保管,因为稍后在您的 Windows PC上使用Google Assistant时将需要它。(Google Assistant)
4) 选择创建 (Create )并进一步按照说明进行操作。
5) 接下来, 在您的浏览器中 打开(open) Google Assistant APIs并选择(Google Assistant APIs)Enable为您的项目 打开Google Assistant API。稍后选择 创建凭据。(Create Credentials.)
6)接下来将是 添加凭据到您的项目 ( Add credentials to your project )屏幕;选择下面列出的响应。
- 您使用的是哪个 API?
- 您将从哪里调用API?
- 您将访问哪些数据?
对于上述三个问题,要提交的这些问题的响应将分别是Google Assistant API、其他 UI(例如Windows、CLI工具)和用户(User)数据。
单击 我需要什么凭据(What credentials do I need)?提交您的回复后。
7) 然后单击设置同意屏幕(Setup consent screen) 并将应用程序类型(Application Type)更改为内部(Internal)。
在应用程序名称中输入 WinGoogleAssistant ,然后单击 屏幕底部的保存。(Save)
8) 然后,Create credentials > Help me choose。按照第6点(Point)的说明进行操作。然后继续下一步。
9)在名称框中 键入WGAredentials 并选择(WGAcredentials )创建 OAuth 客户端 ID。(Create OAuth client ID.)
10) 下载凭据并点击完成(Done)。
11) 现在,选择向下箭头(down arrow) 下载JSON文件。将文件保存在您在步骤 1中创建的(Step 1)Google Assistant文件夹中。
12) 现在按Windows键 + R 并在(Windows)运行(Run)对话框中键入 cmd ,然后按 Enter(Enter)打开命令提示符。在命令提示符下,复制并粘贴以下语法,然后按 Enter(Enter)。
py -m pip install google-assistant-sdk[samples]
13)等待安装,然后复制并粘贴以下语法并再次按Enter(Enter):
py -m pip install --upgrade google-auth-oauthlib[tool]
14)从 C: Drive打开Google Assistant文件夹并找到您最近在步骤 11中保存的(Step 11)JSON文件。右键单击该文件并将其打开。
15) 从属性中,选择文件名并复制它。现在,切换回命令提示符(Command Prompt)并输入:
google-oauthlib-tool --client-secrets C:\GoogleAssistant\
并粘贴您刚刚在上述步骤中复制的文件名,后跟空格(Space)键,然后键入以下语法并按Enter。
--scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless
16) 您将看到一个命令提示符正在运行,稍后您将看到一个URL 显示(URL displayed)在提示您 输入授权码(Enter the authorization code)的提示之前。选择以 https:// 开头的整个URL并复制它。(URL)
17) 现在,打开一个新浏览器并将URL粘贴到地址栏中。使用相同的Google帐户凭据登录。您会看到一个对话框,要求您允许访问Win Google Assistant。点击允许(Allow)。
18) 在下一个窗口中,您会看到一长串字母和数字。使用侧面的复制图标复制(Copy)这些字符。
19) 再次,返回命令提示符(Command Prompt)窗口并粘贴刚刚复制的字符。这是您在第 16 步(Step 16)中被要求输入的授权(Authorization)码。按下Enter后,您将看到“已保存凭据”(‘credentials saved’)
20) 就是这样,您Google Assistant on your Windows 11/10 PC
21) 要进行测试,请在CMD提示窗口中键入:
py -m googlesamples.assistant.grpc.audio_helpers
您的 Windows 11/10 计算机将录制 5 秒的音频并播放。如果您听到音频,则Google 助理(Google Assistant)设置已完成。
22) 现在,找到您在步骤 3(Step 3)中复制并记下的项目 ID ,然后在(Project ID)CMD提示窗口中输入它。然后,按Enter。
23)接下来,输入:
googlesamples-assistant-devicetool --project-id
然后是空格键,输入项目 ID(Project ID),然后再次按空格键并输入下面的命令,然后按Enter以完成Windows 11/10Google Assistant设置。
register-model --manufacturer “Assistant SDK developer” --product-name “Assistant SDK light” --type LIGHT --model “GA4W”
24) 如果您希望Google Assistant具有一键通功能,请在CMD提示窗口中输入以下命令并按Enter 键(Enter):
py -m googlesamples.assistant.grpc.pushtotalk --device-model-id “GA4W” --project-id
25) 您现在可以在程序处于活动状态时按Enter键并说出您希望Google 助理(Google Assistant)执行的操作。
谷歌助理可以免费使用吗?
是的,Google Assistant完全免费使用。它不花钱。如果您碰巧看到任何支付Google Assistant的提示,请知道这是一个骗局。
注意(NOTE):PC 用户可以从github.com下载并安装(github.com)Google Assistant 非官方桌面客户端(Google Assistant Unofficial Desktop Client),然后按照其Wiki指南中的说明在Google Cloud中设置Google Assistant API。
使用 Google 助理安全吗?
这些客户端和方法不是官方的。它们是一种解决方法,因此没有人会说它们是安全的。您可以做的是使用另一个Google帐户,以便您的主帐户保持安全。虽然您不会在手机上获得相同的个性化设置,但您仍然可以使用Google 助理(Google Assistant)。
为什么没有适用于Windows PC的官方Google Assistant客户端?
这是只有谷歌(Google)才能回答的问题,但这主要与他们彼此之间的紧密完成有关。最重要的是,大多数 PC 用户不使用助手,一个典型的例子是Cortana,它没有得到太多使用。
本教程就是关于如何在Windows 11/10 PC上设置Google Assistant的内容!(Google Assistant)在下面的评论部分让我们知道您的经验。
How to set up Google Assistant on Windows 11/10 PC
Just like Microsoft Cortana and Amаzon’s Alexa, you can also use Google Assistant for PC. However, there is no simple way to start accessing Google Assistant for PC; you can always use it in a slightly indirect way but applicable for Windows 11/10 PC and Chromebook. In this post, we will walk you through how to set up Google Assistant on Windows 11/10.
Before you begin, you need first to enable Voice & Audio Activity for your Google Account.
Here’s how:
Google
Manage your Google Account
At the top, tap Data & personalization.
Under Activity controls, tap Web & App Activity.
Check or uncheck the box next to Include audio recordings to turn the setting on or off.
When the audio recording setting is off, voice inputs from interactions with Google Search, Assistant, and Maps won’t be saved to your Google Account, even if you’re signed in. If you turn the audio recordings setting off, previously saved audio is not deleted. You can delete your audio recordings at any time.
Is there Google Assistant for PC?
Yes, there is Google Assistant available on Windows PC through an unofficial client. The client lets you use many of the features of Google’s virtual assistant. It is like your personal Google that does everything for you.
Set up Google Assistant on Windows 11/10
To install Google Assistant for Windows 11/10, you need to download and install Python on your Windows PC. Ensure that you checkmark the box next to Add Python 3.8 to PATH.
After installing Python for Windows, continue as follows:
1) Open Windows Explorer, create a New Folder in C: Drive, and name it GoogleAssistant.
2) Now, in your web browser, open Google Cloud Platform and select Create Project. If it asks you to Sign in, use your Google account credentials and log in.
3) Use WinGoogleAssistant to name your project. You’ll see a Project ID under your project name; note it down somewhere and keep it safe as it will be required later on while using Google Assistant on your Windows PC.
4) Select Create and follow the instructions further.
5) Next, open Google Assistant APIs in your browser and select Enable to turn on Google Assistant API for your project. Later select Create Credentials.
6) Next will be the Add credentials to your project screen; choose the below-listed responses.
- Which API are you using?
- Where will you be calling the API from?
- What data will you be accessing?
The responses to be submitted for these questions will be Google Assistant API, Other UI (e.g., Windows, CLI tool), and User data, respectively, for the three questions above.
Click on What credentials do I need? After submitting your responses.
7) Then click on the Setup consent screen and change the Application Type to Internal.
Enter WinGoogleAssistant in the Application name and click Save at the bottom of the screen.
8) Then, Create credentials > Help me choose. Follow the instructions like the Point no 6. And then proceed towards the next step.
9) Type WGAcredentials in the name box and select Create OAuth client ID.
10) Download the credentials and tap Done.
11) Now, select the down arrow to download the JSON file. Save the file in the Google Assistant folder you created in Step 1.
12) Now press Windows key + R and type cmd in the Run dialog box, and hit Enter to open Command Prompt. In the command prompt, copy and paste in the syntax below and hit Enter.
py -m pip install google-assistant-sdk[samples]
13) Wait for the installation and then copy and paste in the syntax below and hit Enter again:
py -m pip install --upgrade google-auth-oauthlib[tool]
14) Open the Google Assistant folder from C: Drive and locate the JSON file you recently saved in Step 11. Right-click on the file and open it.
15) From properties, select the file name and copy it. Now, switch back to Command Prompt and type:
google-oauthlib-tool --client-secrets C:\GoogleAssistant\
and paste the file name you just copied in the step above followed by a Space bar, and then type the syntax below and hit Enter.
--scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless
16) You’ll see a command prompt running, and later on, you will see a URL displayed just before a prompt that asks you to Enter the authorization code. Select the entire URL starting with https:// and copy it.
17) Now, open a new browser and paste the URL in the address bar. Use the same Google account credentials to sign in. You’ll see a dialog asking you to Allow access to Win Google Assistant. Tap Allow.
18) In the next window, you’ll see a long string of letters and numbers. Copy those characters using the copy icon at the side.
19) Again, go back to the Command Prompt window and paste the characters you just copied. It is the Authorization code you were asked to enter in Step 16. As soon as you press Enter, you’ll see a ‘credentials saved’
20) That’s it, you have Google Assistant on your Windows 11/10 PC
21) To test, on your CMD prompt window, type:
py -m googlesamples.assistant.grpc.audio_helpers
Your Windows 11/10 computer will record audio of 5 seconds and play it back. If you hear the audio, the Google Assistant setup is done.
22) Now, locate the Project ID you copied and noted in Step 3 and enter it in the CMD prompt window. Then, press Enter.
23) Next, type in:
googlesamples-assistant-devicetool --project-id
followed by space bar, type the Project ID and again press space bar and type in the command below and hit Enter to finish the Google Assistant setup on Windows 11/10.
register-model --manufacturer “Assistant SDK developer” --product-name “Assistant SDK light” --type LIGHT --model “GA4W”
24) If you want Google Assistant with push to talk functionality, enter the command below in the CMD prompt window and hit Enter:
py -m googlesamples.assistant.grpc.pushtotalk --device-model-id “GA4W” --project-id
25) You can now press Enter key while the program is active and speak out about what you want your Google Assistant to do.
Is Google Assistant free to use?
Yes, Google Assistant is completely free to use. It does not cost money. If you happen to see any prompt to pay for Google Assistant, know that it is a scam.
NOTE: PC users can download and install the Google Assistant Unofficial Desktop Client from github.com and then follow the instructions in their Wiki guide to set up the Google Assistant API in Google Cloud.
Is Google Assistant safe to use?
These clients and methods are not official. They are a workaround, and hence no one would say that they are safe. What you can do is use another Google account so your primary account remains secure. While you will not get the same personalization on the phone, you can still use Google Assistant.
Why is there no official Google Assistant client for Windows PC?
That’s something only Google can answer, but it’s mostly related to the close completion they have with each other. On top of this, most PC users don’t use an assistant, and a classic example was Cortana which did not pick up much usage.
That’s it on this tutorial on how to set up Google Assistant on Windows 11/10 PC! Let us know your experience in the comments section below.