无法注册 Google 助理设备型号
Unable to register Google Assistant Device Model
我一直在努力在我的 Windows 10 PC 上安装 Google 助手。我负责 "Register Device" 部分。
Developers.google.com
对 运行 说以下命令来注册您的设备。
googlesamples-assistant-devicetool register-model --manufacturer "Assistant SDK developer" \
--product-name "Assistant SDK light" --type LIGHT --model my-model
我为 Windows(和我)得出的结论是:
googlesamples-assistant-devicetool register-model --manufacturer "Assistant SDK developer" --product-name "Assistant SDK light" --type LIGHT --model Sudda2252
但是,当我 运行 它时,我得到了错误
Error: Error loading client secret: [Errno 2] No such file or directory: 'client_secret_XXX.apps.googleusercontent.com.json'.
Run the device tool with --client-secrets or --project-id option.
Or copy the client_secret_XXX.apps.googleusercontent.com.json file in the current directory.
所以我将命令编辑为:
googlesamples-assistant-devicetool register-model --manufacturer "Assistant SDK developer" --product-name "Assistant SDK light" --type LIGHT --model 'Sudda2252' --client-secrets "C:\Users\Sudda\Desktop\GoogleAss\client_secret_XXX.json"
错误所在:
Error: no such option: --client-secrets
请帮助我哪里出错了?
P.S。
我试过直接启动 Google 助手,但是 returns 出错
ERROR:root:Option --device-model-id required when registering a device instance.
参考文献:
谢谢,
苏达
编辑:我的解决方法曾经奏效,但后来就没用了。停止工作。
感谢@Nick Feller 的尝试,但没有奏效。
所以要么我的电脑有问题 :D,要么我们在这里遗漏了一些东西。
在devicetool, the --client-secrets
argument is in relation to the tool itself, not the command.
参数的正确顺序是:
googlesamples-assistant-devicetool --client-secrets register-model ...
一个非常常见的错误 - Google 和最终用户 - 是 Client S[=25= 的命名]秘密文件。 Google 自动命名您的 CS,并在文件名末尾附加 (1)。要设置您的 G 助手,
- 删除名字中的(1)
- 在包含 CS 的文件夹中打开 CMD(最好在没有其他任何东西的文件夹中)
- 运行
googlesamples-assistant-devicetool register-model --manufacturer "Assistant SDK developer" --product-name "Assistant SDK light" --type LIGHT --model Sudda2252
- 现在运行
googlesamples-assistant-pushtotalk --project-id ##MODEL## --device-model-id Sudda2252
其中 ##MODEL## = 您的项目名称。
- 之后,只需运行
googlesamples-assistant-pushtotalk
启动G助手
我一直在努力在我的 Windows 10 PC 上安装 Google 助手。我负责 "Register Device" 部分。
Developers.google.com
对 运行 说以下命令来注册您的设备。
googlesamples-assistant-devicetool register-model --manufacturer "Assistant SDK developer" \
--product-name "Assistant SDK light" --type LIGHT --model my-model
我为 Windows(和我)得出的结论是:
googlesamples-assistant-devicetool register-model --manufacturer "Assistant SDK developer" --product-name "Assistant SDK light" --type LIGHT --model Sudda2252
但是,当我 运行 它时,我得到了错误
Error: Error loading client secret: [Errno 2] No such file or directory: 'client_secret_XXX.apps.googleusercontent.com.json'.
Run the device tool with --client-secrets or --project-id option.
Or copy the client_secret_XXX.apps.googleusercontent.com.json file in the current directory.
所以我将命令编辑为:
googlesamples-assistant-devicetool register-model --manufacturer "Assistant SDK developer" --product-name "Assistant SDK light" --type LIGHT --model 'Sudda2252' --client-secrets "C:\Users\Sudda\Desktop\GoogleAss\client_secret_XXX.json"
错误所在:
Error: no such option: --client-secrets
请帮助我哪里出错了?
P.S。
我试过直接启动 Google 助手,但是 returns 出错
ERROR:root:Option --device-model-id required when registering a device instance.
参考文献:
谢谢, 苏达
编辑:我的解决方法曾经奏效,但后来就没用了。停止工作。
感谢@Nick Feller 的尝试,但没有奏效。
所以要么我的电脑有问题 :D,要么我们在这里遗漏了一些东西。
在devicetool, the --client-secrets
argument is in relation to the tool itself, not the command.
参数的正确顺序是:
googlesamples-assistant-devicetool --client-secrets register-model ...
一个非常常见的错误 - Google 和最终用户 - 是 Client S[=25= 的命名]秘密文件。 Google 自动命名您的 CS,并在文件名末尾附加 (1)。要设置您的 G 助手,
- 删除名字中的(1)
- 在包含 CS 的文件夹中打开 CMD(最好在没有其他任何东西的文件夹中)
- 运行
googlesamples-assistant-devicetool register-model --manufacturer "Assistant SDK developer" --product-name "Assistant SDK light" --type LIGHT --model Sudda2252
- 现在运行
googlesamples-assistant-pushtotalk --project-id ##MODEL## --device-model-id Sudda2252
其中 ##MODEL## = 您的项目名称。 - 之后,只需运行
googlesamples-assistant-pushtotalk
启动G助手