Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

AIY-voice: problems encountered by assistant_grpc_demo.py after some time of use #745

Open
Erra-Ernesto opened this issue Sep 23, 2021 · 3 comments

Comments

@Erra-Ernesto
Copy link

Erra-Ernesto commented Sep 23, 2021

Hi everyone, I have two different problems:

  1. the voice/assistant_grpc_demo.py application works initially without problems. However, after a few hours that I have left the device on and running, the assistant_grpc_demo.py application stops working correctly. The button remains lit in bright red, but if I press it it no longer turns red and it no longer responds to my voice commands (as if it didn't listen to me at all).
    if I stay connected with ssh, after some time the application replies with the message:
    underrun !!! (at least 170,907 ms long)
    I don't know if it can help.

  2. after 7 days of use, the application gives me this error:
    google.auth.exceptions.RefreshError: ('invalid_grant: Token has been expired or revoked.', '{\n "error": "invalid_grant",\n "error_description": "Token has been expired or revoked."\n}')
    I also tried to create a new OAuth 2.0 credential with a new key that I went to overwrite in the assistant.json file but the problem persists.
    Edit: I temporarily solved it by deleting the file ~/.cache/voice-recognizer/assistant_credentials.json. However, I need the token to never expire. How can I solve?

Thanks in advance for an answer to these two annoying problems.

@Hernane007
Copy link

Hi, my problem is similar, you need help me ?

Please, I'm trying to perform the step to authorize the API credential, so I can use the demo assistant, but I can't find the url for authorization, the following error appears:

pi@raspberrypi:~/AIY-voice-kit-python $ src/examples/voice/assistant_grpc_demo.py
DEBUG:google.auth.transport.requests:Making request: POST https://oauth2.googleapis.com/token DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): oauth2.googleapis.com:443 DEBUG:urllib3.connectionpool:https://oauth2.googleapis.com:443 "POST /token HTTP/1.1" 400 None Traceback (most recent call last): File "src/examples/voice/assistant_grpc_demo.py", line 57, in main() File "src/examples/voice/assistant_grpc_demo.py", line 49, in main language_code=args.language) File "/home/pi/AIY-projects-python/src/aiy/assistant/grpc.py", line 258, in init super().init(language_code, volume_percentage) File "/home/pi/AIY-projects-python/src/aiy/assistant/grpc.py", line 94, in init credentials = auth_helpers.get_assistant_credentials() File "/home/pi/AIY-projects-python/src/aiy/assistant/auth_helpers.py", line 151, in get_assistant_credentials return _try_to_get_credentials(credentials_file) File "/home/pi/AIY-projects-python/src/aiy/assistant/auth_helpers.py", line 100, in _try_to_get_credentials return _load_credentials(_ASSISTANT_CREDENTIALS) File "/home/pi/AIY-projects-python/src/aiy/assistant/auth_helpers.py", line 63, in _load_credentials credentials.refresh(http_request) File "/usr/local/lib/python3.7/dist-packages/google/oauth2/credentials.py", line 206, in refresh self._scopes, File "/usr/local/lib/python3.7/dist-packages/google/oauth2/_client.py", line 248, in refresh_grant response_data = _token_endpoint_request(request, token_uri, body) File "/usr/local/lib/python3.7/dist-packages/google/oauth2/_client.py", line 124, in _token_endpoint_request _handle_error_response(response_body) File "/usr/local/lib/python3.7/dist-packages/google/oauth2/_client.py", line 60, in _handle_error_response raise exceptions.RefreshError(error_details, response_body) google.auth.exceptions.RefreshError: ('invalid_grant: Bad Request', '{\n "error": "invalid_grant",\n "error_description": "Bad Request"\n}')

@Erra-Ernesto
Copy link
Author

Erra-Ernesto commented Aug 24, 2022 via email

@Erra-Ernesto
Copy link
Author

Erra-Ernesto commented Aug 24, 2022 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants