简体   繁体   中英

Trouble setting up Google Assistant SDK on raspberry pi

me and my buddy are trying to get a raspberry pi working with google assistant in or to power a lamp and the Google Assistant is doing weird stuff.

We decided to do a fresh install of everything to make sure that nothing was wrong with our code and attempt to follow instructions to the letter.

With him on the raspberry pi and I on a Linux machine we ended up with the same problem. Html and no audio output.

ON_MUTED_CHANGED:
{"is_muted": false}
ON_MEDIA_STATE_IDLE
ON_START_FINISHED
ON_DEVICE_ACTION:
{
 "inputs": [
{
  "intent": "action.devices.EXECUTE",
  "payload": {
    "commands": [
      {
        "devices": [
          {
            "id": "F993B91C4474F28BF79BBCB988627ACC"
          }
        ],
        "execution": [
          {
            "command": "action.devices.commands.VISUAL_OUTPUT",
            "params": {
              "html": "<html> <head><meta charset=\"UTF-8\">...     

After that we get a massive amount of html when we should be getting a audio response from the assistant. We have no idea how this happened and how to get the audio working again.

I have a feeling that this is something wrong with the visual_output but I don't know why its printing and not responding or why its happening on both of our devices.

Any help would be greatly appreciated.

I think I have found a temporary solution for this problem. Enter a wrong model-id while running the sample code.

googlesamples-assistant-hotword --project_id project-id --device_model_id model-id

It works for me!

Another thing that worked for us is using a previously authenticated Google Account. We deleted /home/pi/.cache/voice-recognizer/assistant_credentials.json and /home/pi/assistant.json. We then downloaded a new client-secret json and changed which account the voice kit was linked to. This got us in. However, we happened to have previous Google accounts that were authenticated prior to this weekend's change.

I hope Assistant SDK Support sees this. We have successfully built and programmed nearly 100 kits this summer, and at some point since July 27th, new accounts stopped giving a response after the hotword is said.

I don't have enough reputation to comment but I figured I would add what I've found. I was also having this issue and seeing the HTML response. I got frustrated with not being able to get an audio response so I finally copied the HTML response and discovered what N. Jackson posted. I even used Postman to sed a POST request to the data-post-url listed on the page and included the following JSON information in the body:

{
"name":"projects/<project-id>/devices/<device-id>/disclosureConsents/0.1",
"device_model_id":"<device-model-id>",
"terms_of_service_link":"https://myaccount.google.com/termsofservice",
"privacy_policy_link":"https://myaccount.google.com/privacypolicy"
}

I was able to get a 200 OK response but still encountered the issue from the assistant.

After changing to an incorrect model-id when starting the sample, it began working perfectly.

Hoping to find a better resolution to this!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM