Google assistant on raspberry pi with voice bonnet not working

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
ps_nithin
 
Posts: 33
Joined: Fri Sep 30, 2022 11:17 pm

Google assistant on raspberry pi with voice bonnet not working

Post by ps_nithin »

Hii,
I am unable to get google assistant working on my raspberry pi with adafruit voice bonnet using this guide https://learn.adafruit.com/using-google ... t/overview. This was solved before viewtopic.php?t=195146 . Kindly help to fix the issue.

I am getting the following error. I am also getting google-auth dependency error when updating the packages.

Code: Select all

(env) pi@zumopi:~ $ python3 my_gv_buttontotalk.py 
Traceback (most recent call last):
  File "/home/pi/my_gv_buttontotalk.py", line 40, in <module>
    from google.assistant.embedded.v1alpha2 import (
  File "/home/pi/env/lib/python3.9/site-packages/google/assistant/embedded/v1alpha2/embedded_assistant_pb2.py", line 36, in <module>
    _descriptor.EnumValueDescriptor(
  File "/home/pi/env/lib/python3.9/site-packages/google/protobuf/descriptor.py", line 796, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
(env) pi@zumopi:~ $ 

Thanks,

User avatar
barshatriplee
 
Posts: 200
Joined: Wed Mar 22, 2023 10:11 am

Re: Google assistant on raspberry pi with voice bonnet not working

Post by barshatriplee »

I think the error is due to a compatibility issue between the version of the protobuf package installed on your Raspberry Pi and the generated code used by the Google Assistant library. Try to update the protobuf library.

User avatar
ps_nithin
 
Posts: 33
Joined: Fri Sep 30, 2022 11:17 pm

Re: Google assistant on raspberry pi with voice bonnet not working

Post by ps_nithin »

I updated the protobuf package but still getting the same result.

Code: Select all

pi@zumopi:~ $ pip3 install --upgrade protobuf
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: protobuf in /usr/local/lib/python3.9/dist-packages (4.23.1)
Collecting protobuf
  Using cached https://www.piwheels.org/simple/protobuf/protobuf-4.23.1-cp39-cp39-linux_armv6l.whl (946 kB)
  Using cached https://www.piwheels.org/simple/protobuf/protobuf-4.23.0-cp39-cp39-linux_armv6l.whl (946 kB)
pi@zumopi:~ $ 

User avatar
edgjr
 
Posts: 143
Joined: Mon Jan 16, 2012 6:18 pm

Re: Google assistant on raspberry pi with voice bonnet not working

Post by edgjr »

The message says to downgrade the protobuf library, not upgrade.

User avatar
ps_nithin
 
Posts: 33
Joined: Fri Sep 30, 2022 11:17 pm

Re: Google assistant on raspberry pi with voice bonnet not working

Post by ps_nithin »

I downgraded protobuf version to 3.20.0. Then i am getting import error for module assistant_helpers - module not found error.

User avatar
edgjr
 
Posts: 143
Joined: Mon Jan 16, 2012 6:18 pm

Re: Google assistant on raspberry pi with voice bonnet not working

Post by edgjr »

Then perhaps using the second suggestion from the error message - use the ENV setting.

User avatar
ps_nithin
 
Posts: 33
Joined: Fri Sep 30, 2022 11:17 pm

Re: Google assistant on raspberry pi with voice bonnet not working

Post by ps_nithin »

I didn't try that since it says it will much slower with pure python parsing. Or regenerating the protos will be another option?

User avatar
ps_nithin
 
Posts: 33
Joined: Fri Sep 30, 2022 11:17 pm

Re: Google assistant on raspberry pi with voice bonnet not working

Post by ps_nithin »

Anyone know how to regenerate the protos?

User avatar
ps_nithin
 
Posts: 33
Joined: Fri Sep 30, 2022 11:17 pm

Re: Google assistant on raspberry pi with voice bonnet not working

Post by ps_nithin »

Any suggestions?

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”