Unable to register Google Assistant Device Model

跟風遠走 提交于 2019-12-23 01:03:54

问题


I am trying ever so hard to get the Google Assistant on my Windows 10 PC. I am up to the "Register Device" part.

Developers.google.com Says to run the following command to register your device.

googlesamples-assistant-devicetool register-model --manufacturer "Assistant SDK developer" \
          --product-name "Assistant SDK light" --type LIGHT --model my-model

Which i conclude for Windows (and me) is:

googlesamples-assistant-devicetool register-model --manufacturer "Assistant SDK developer" --product-name "Assistant SDK light" --type LIGHT --model Sudda2252

But, when i run it, i get the error

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.

So i edit the command to:

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"

Where the error is:

Error: no such option: --client-secrets

Please help where i am going wrong?

P.S.
I have tried launching the Google Assistant directly, but it returns an error

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

Refs:

StackOverflow

Reddit

XDA

Google Developers

Thanks, Sudda



Edit: My workaround worked once, but then it was useless. Stopped working.
And thanks @Nick Feller for trying, but didn't work.
So either i have a problematic computer :D, or we're missing something here.


回答1:


A very commonly made error - By Google and by the End User - is the naming of your Client Secret file. Google automatically names your CS with a (1) appended to the end of your file name. To setup your G Assistant,

  1. Delete the (1) in the name
  2. Open CMD in the folder with your CS (best in a folder with nothing else)
  3. Run googlesamples-assistant-devicetool register-model --manufacturer "Assistant SDK developer" --product-name "Assistant SDK light" --type LIGHT --model Sudda2252
  4. Now run googlesamples-assistant-pushtotalk --project-id ##MODEL## --device-model-id Sudda2252 Where ##MODEL## = Your project name.
  5. After that, just run googlesamples-assistant-pushtotalk to start G Assistant.



回答2:


In the devicetool, the --client-secrets argument is in relation to the tool itself, not the command.

The correct order of arguments would be:

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



来源:https://stackoverflow.com/questions/48879645/unable-to-register-google-assistant-device-model

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!