无法注册Google智能助理设备型号

时间:2018-02-20 07:10:45

标签: python google-assistant-sdk

我正在努力在我的Windows 10 PC上获得Google智能助理。我很注重"注册设备"部分。

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智能助理,但会返回错误

ERROR:root:Option --device-model-id required when registering a device instance.

参考文献:

StackOverflow

Reddit

XDA

Google Developers

谢谢, Sudda



编辑:我的解决方法工作了一次,但后来没用了。停止工作。
感谢@Nick Feller尝试,但没有工作。
所以要么我有一台有问题的电脑:D,或者我们在这里遗漏了一些东西。

2 个答案:

答案 0 :(得分:2)

devicetool中,--client-secrets参数与工具本身有关,而不是the command

正确的参数顺序是:

googlesamples-assistant-devicetool --client-secrets register-model ...

答案 1 :(得分:0)

一个非常常见的错误 - Google和最终用户 - 是 C lient S 错误文件的命名。 Google会自动为您的 CS 命名,并在文件名末尾添加(1)。要设置G助手,

  1. 删除名称
  2. 中的(1)
  3. 使用 CS 在文件夹中打开CMD(最好在没有其他内容的文件夹中)
  4. 运行googlesamples-assistant-devicetool register-model --manufacturer "Assistant SDK developer" --product-name "Assistant SDK light" --type LIGHT --model Sudda2252
  5. 现在运行googlesamples-assistant-pushtotalk --project-id ##MODEL## --device-model-id Sudda2252 其中## MODEL ## =您的项目名称。
  6. 之后,只需运行googlesamples-assistant-pushtotalk即可启动G Assistant。