7

Installing Google assistant on my pi with this guide: https://developers.google.com/assistant/sdk/guides/library/python/embed/run-sample

(env) pi@raspberrypi:~ $ source env/bin/activate
    (env) pi@raspberrypi:~ $ googlesamples-assistant-hotword --project_id 'celius-54926' --device_model_id 'celius-54926-celius-qyn1r6'
    device_model_id: celius-54926-celius-qyn1r6
    device_id: A1CE24415E5C880BCA74644CD6315DC2

    Segmentation fault
craigcaulfield
  • 3,381
  • 10
  • 32
  • 40
King Pretzel
  • 71
  • 1
  • 3
  • Which version of the SDK do you have? You can find out by running pip freeze. – Nick Felker May 21 '18 at 14:05
  • (env) pi@raspberrypi:~ $ pip freeze cachetools==2.1.0 certifi==2018.4.16 cffi==1.11.5 chardet==3.0.4 click==6.7 enum34==1.1.6 futures==3.1.1 google-assistant-grpc==0.2.0 google-assistant-library==1.0.0 google-assistant-sdk==0.5.0 google-auth==1.4.1 google-auth-oauthlib==0.2.0 googleapis-common-protos==1.5.3 grpcio==1.12.0 idna==2.6 oauthlib==2.0.7 pathlib2==2.3.2 pkg-resources==0.0.0 protobuf==3.5.2.post1 pyasn1==0.4.2 pyasn1-modules==0.2.1 pycparser==2.18 requests==2.18.4 requests-oauthlib==0.8.0 rsa==3.4.2 six==1.11.0 sounddevice==0.3.11 tenacity==4.12.0 urllib3==1.22 – King Pretzel May 21 '18 at 20:54
  • Can you file an issue on the GitHub page: https://github.com/googlesamples/assistant-sdk-python/issues? – Nick Felker May 22 '18 at 17:39
  • I am having the same problem and have tried all suggestions (enabled assistant api for the project, used `googlesamples-assistant-devicetool` to remove and register my devices.) I believe that the devicetool is working because I could register a new device or delete an existing device and see the changes on the device registration page. I tried `googlesamples-assistant-hotword` and `google-assistant-demo` and both are giving me `Segmentation Fault` without further information. – Unplug Jan 01 '19 at 23:58
  • 1
    Also, according to the doc, `When you run the sample the first time, it will generate a device instance for your particular device.` But after I ran `googlesamples-assistant-hotword` and then used `googlesamples-assistant-devicetool --project-id my-prj-id list --device`, there was no device instance created. I manually created one but still got the seg fault. – Unplug Jan 02 '19 at 15:59

4 Answers4

7

I had the same issue.

I carried on reading the page : https://developers.google.com/assistant/sdk/guides/library/python/embed/run-sample under the heading "Find the device instance ID" it seems my device was not registered.

So I manually registered the device from the pi with the help page here: https://developers.google.com/assistant/sdk/reference/device-registration/device-tool#register-device.

(env) pi@raspberrypi:~ $  googlesamples-assistant-devicetool --project-id YOUR_DEVICE_ID register-device --device 4D609xxxxxxxxxxxxxxxxxxx --model YOUR_MODEL_ID --client-type SERVICE
Creating new device
Error: Failed to register device: 403
Google Assistant API has not been used in project 5739xxxxxxxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview?project=5739xxxxxxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

So I followed the link and enabled the API under my google account, and retried.

(env) pi@raspberrypi:~ $ googlesamples-assistant-devicetool --project-id YOUR-PROJECT-ID register-device --device 4D60xxxxxxxxxxxxxxx --model YOUR_MODEL_ID --client-type SERVICE

Creating new device

Device instance 4D60xxxxxxxxx successfully registered

Now it works ok.

1

I was facing the same issue. After a lot of research, I found that there was a new version of google-assistant-library

Once I upgraded the same to v1.0.1 from 1.0.0, the issue was resolved.

Open your env and run

python -m pip install --upgrade google-assistant-library==1.0.1

Let me know if any issues.

Alok Rajasukumaran
  • 381
  • 1
  • 5
  • 20
0

I face same problem for Ubuntu assistant setup, I found my google assistant api was not enabled. I enable it from api console and it started working.

mhdnp1234
  • 178
  • 7
0

I was facing the same issue in RPi4. Finally the problem was fixed by newer version of the google-assistant library, 1.1.0 instead of 1.0.1 version:

python -m pip install --upgrade google-assistant-library==1.1.0
YvetteLee
  • 1,057
  • 3
  • 13
  • 27