我正在努力在我的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.
参考文献:
谢谢, Sudda
编辑:我的解决方法工作了一次,但后来没用了。停止工作。
感谢@Nick Feller尝试,但没有工作。
所以要么我有一台有问题的电脑:D,或者我们在这里遗漏了一些东西。
答案 0 :(得分:2)
在devicetool中,--client-secrets
参数与工具本身有关,而不是the command。
正确的参数顺序是:
googlesamples-assistant-devicetool --client-secrets register-model ...
答案 1 :(得分:0)
一个非常常见的错误 - Google和最终用户 - 是 C lient S 错误文件的命名。 Google会自动为您的 CS 命名,并在文件名末尾添加(1)。要设置G助手,
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 Assistant。