balena-io-experimental / balena-google-aiy

Run Google AIY as a Docker container on resin.io!
4 stars 3 forks source link

Assistant requires manual shell interaction at first run #4

Open curcuz opened 7 years ago

curcuz commented 7 years ago
root@resindevice:/usr/src/app/aiyprojects-raspbian-voicekit# python3 src/assistant_library_demo.py
Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=XXX-YYY.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fassistant-sdk-prototype&state=XXX&prompt=consent&access_type=offline
Enter the authorization code: XYZ
[2017-11-13 03:43:07,784] INFO:root:OAuth credentials initialized: /root/.cache/voice-recognizer/assistant_credentials.json
Say "OK, Google" then speak, or press Ctrl+C to quit...

this results in the main python script crashing on resin.

shaunmulligan commented 7 years ago

@curcuz what do you think the best way of handling this is? I was thinking a simple server that would provide the user the link, open that in a new tab and then they could enter the code into the server and submit it?

We would then just save that code in /data

curcuz commented 7 years ago

[EDIT: at first read, I missed your last statement, that makes mine redundant :P] @shaunmulligan that might work, if paired with something like: