Google assistant with voice bonnet

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/
User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Google assistant with voice bonnet

Post by mikeysklar »

Nice looking bot build you got there. I think we have discussed it before.

The Google Assistant guide will take some time to resolve (not fast).

There are other guides showing essentially the same process. You might want to review some of them to see if they figured out how to get through an updated Google oauth process.

https://pimylifeup.com/raspberry-pi-google-assistant/
https://www.instructables.com/Google-As ... erry-Pi-1/
https://www.hackster.io/Shailesh-Coder/ ... way-eee782
https://medium.com/@kevalpatel2106/turn ... 29ad220075

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

Re: Google assistant with voice bonnet

Post by ps_nithin »

Yeah.

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

Re: Google assistant with voice bonnet

Post by ps_nithin »

I am getting authorization code by running local web server on the host machine. I modified the url to

Code: Select all

 
https://accounts.google.com/o/oauth2/v2/auth?scope=email%20profile&response_type=code&redirect_uri=http%3A//127.0.0.1%3A80/auth.php&client_id=<client_id>
On the local web server root i placed the file auth.php with following code.

Code: Select all

<?php
$ga_auth_code=$_GET['code'];
echo $ga_auth_code;
?>
Then it displays the authorization code.
But when i paste the authorization code on raspberry pi i am getting the following output
Screenshot from 2022-10-21 23-39-16.png
Screenshot from 2022-10-21 23-39-16.png (139.18 KiB) Viewed 116 times
I suppose it is because redirect_uri has changed. But i am not sure how to edit oauthlib python library files.

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

Re: Google assistant with voice bonnet

Post by ps_nithin »

Google assistant might take a while to work. I am using this speech recognition library for now. https://pypi.org/project/SpeechRecognition/. I am happy with the results. https://twitter.com/ps__nithin/status/1 ... DeuSg&s=19

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Google assistant with voice bonnet

Post by mikeysklar »

Cool. Thank you for sharing this. I've not heard of this python based SpeechRecognition before, but it looks a lot more friendly to setup.

User avatar
MakerMelissa
 
Posts: 375
Joined: Wed Jun 05, 2013 2:10 am

Re: Google assistant with voice bonnet

Post by MakerMelissa »

Hi,

Sorry for the delay. I was out sick with COVID. Anyways, there were a couple of issues I bumped into.

1. There was the first one you mentioned. I figured out that by leaving the Google project in test mode and not publishing, but adding yourself as a test user fixes it.
2. The other issues was that software package updates broke the code and that had to be sorted out. I just finished updating the guide and code and testing it out so you should be good to go.

Melissa

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Google assistant with voice bonnet

Post by mikeysklar »

Thank you @MakerMelissa.

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

Re: Google assistant with voice bonnet

Post by ps_nithin »

Thank you @MakerMelissa. Google assistant is now working on my device.

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”