When installing Google Assistant, I an error “…googlesamples.assistant' is a package and cannot be directly executed…”

回眸只為那壹抹淺笑 提交于 2019-12-01 10:29:46

As per version 0.3.0 of the SDK the gRPC samples are using a different auth helpers.

pip install --upgrade google-auth-oauthlib[tool]
google-oauthlib-tool --client-secrets path/to/client_secret_XXXXX.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless

And you can launch the update gRPC sample with:

python -m googlesamples.assistant.grpc.pushtotalk

You should be able to follow the instructions from the SDK package and gRPC package page and explore the reference sample

Try this command instead:

python -m googlesamples.assistant.grpc.audio_helpers

If you go to the following path you will notice that there is a directory named grpc inside assistant directory.

C:\Users\%username%\appdata\local\programs\python\python36-32\lib\site-packages\googlesamples\assistant\

That is why you need to append .grpc next to assistant. And inside grpc directory you can see audio_helpers.py script.

To launch google assistant enter following command:

python -m googlesamples.assistant.grpc.pushtotalk

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