Introduction: Hands Free Google Assistant for Raspberry Pi

Hello and welcome to my first Instructable!

In this instructable I am going to show you what I consider to be the easiest way to install an all singing, all dancing Google Assistant on your Raspberry Pi. She is completely hands free with the OK Google command and she starts up automatically when you boot up your Pi. She's super cool and seriously easy to setup!

So how's this all possible?

A short while ago Google released a do-it-yourself AI kit with issue #57 of The Magpi. This made it extremely easy to create your own Google assistant however getting hold of the voice kit was little bit harder and in many places it sold out within hours.

Fortunately, Google made all the software available online complete with full instructions. This meant that we did not need a copy of The Magpi to take advantage of all that hard work.

Despite this, there doesn't appear to be any clear instructions online on utilizing the voice kit without a copy of the magazine or without the hardware that was shipped with it. Instead, most of the tutorials attempt to install everything from scratch often resulting in mess of code that's impossible to follow for non-coders like me.

And that's where this Instructable comes in. It is the outcome of 2 days hard work looking at hundreds of tutorials, videos and posts online. The result is a stable Google Assistant which runs on startup and is voice activated with the 'OK Google' hotword.

What’s required?

To complete this Instructable successfully you will need the following:

  • A Raspberry Pi 3 (with the usual microSD card and power cord). *Thank you to MichaelW142 who has confirmed that this also works with Raspberry Pi 2.
  • A basic speaker with a 3.5 mm aux connection
  • A USB microphone
  • A mouse and keyboard

Step 1: Formatting the SD Card

Picture of Formatting the SD Card

The very first thing that we need to do is to format our SD card. Let’s use the SD Association's Formatting Tool which is recommended by the official Raspberry Pi Foundation.

Once installed, launch the application and click ‘Option’ You need to change the option for ‘FORMAT SIZE ADJUSTMENT’ to ‘ON’.

Now click ‘OK’ and double check that we are formatting the correct drive, then click ‘Format’. This shouldn’t take too long, just wait for the confirmation that the drive was formatted successfully before you move onto the next step.

Step 2: Preparing the SD Card

Picture of Preparing the SD Card

Next we need to download the Voice Kit microSD card image for the Raspberry Pi. You can download the image from my Google Drive.

In order to transfer the image that we just downloaded onto our SD card we are going to use a program called Etcher.io. It’s free, open source and does not require installation.

Once you’ve downloaded Etcher, run the program and you should see a screen like the one above. It can take a minute or two to load so if it doesn’t load right away be patient.

Click ‘Select image’ and navigate to the voice kit image that we just downloaded (aiyprojects-2017-05-03.img). Once selected double check that you are writing the contents onto the correct disk. Assuming that we have the correct disk selected then click ‘Flash!’.

It can take around 20 minutes or more to write the image to your SD card so feel free to go and make yourself a nice cup of tea and I will see you back here in a bit!

Step 3: Power Up That Pi!

Picture of Power Up That Pi!

As soon as the SD card is ready we can put the microSD card into our Raspberry Pi. At this point we also need to connect our power lead, HDMI cable, keyboard, mouse, monitor, speaker and USB microphone. Hopefully your setup should look something like mine.

I am using a wireless keyboard and mouse so don’t freak out if you end up with a couple of extra cables with your own setup!

With the power cable plugged in allow your Raspberry Pi to boot up and you will soon be presented with the standard Pixel desktop.

Step 4: Initial Configuration

Picture of Initial Configuration

Grab your cursor and navigate to the Raspberry Pi logo at the top left of your screen. From the dropdown select ‘Preferences’ and then ‘Raspberry Pi Configuration’.

Next, go to ‘Interfaces’ and enable 'SSH'.

Now click on the WiFi logo at the top right of the screen and select your WiFi network. If your WiFi is password protected you will prompted to enter that in. The green tick confirms that we connected successfully and we’re ready to move onto the next step.

Step 5: Updating the Installation

Picture of Updating the Installation

This is about as advanced as this tutorial gets. We are going to use the dev terminal to update the Google Assistant SDK, Project Kit & dependencies to ensure we have the latest versions. Do not panic if none of this makes much sense to you but it is essential that we do not skip this step. Just do exactly as this tutorial says being careful not to make any typos and it will all work out just fine.

So, panic over, let’s begin! Double click on the desktop icon name ‘Start dev terminal’.

You should see a scary looking dev terminal window like the one above.

Next type the following commands into the terminal exactly as they appear below. There are 9 commands here and each should be entered separately in the order in which they appear. After typing each command hit ‘Enter’ on your keyboard before moving onto the next one. Some of the commands will take a few seconds to complete so be patient waiting for each to finish before moving onto the next one.

cd ~/assistant-sdk-python
git checkout master
git pull origin master
cd ~/voice-recognizer-raspi
git checkout master
git pull origin master
cd ~/voice-recognizer-raspi 
rm -rf env
scripts/install-deps.sh

Step 6: Preparing the Configuration Files

Next we need to backup our existing configurations files and bring over the newest versions that were just updated. Here’s 4 more commands for you to do just that. These can be done in the same dev terminal that we were just using. Once again, they must be done in this order and should be typed precisely as they appear below:

cp ~/.config/status-led.ini ~/.config/status-led.ini~
cp ~/.config/voice-recognizer.ini ~/.config/voice-recognizer.ini~
cp ~/voice-recognizer-raspi/config/status-led.ini.default ~/.config/status-led.ini
cp ~/voice-recognizer-raspi/config/voice-recognizer.ini.default ~/.config/voice-recognizer.ini

Step 7: Setting Up the Hotword

Picture of Setting Up the Hotword

Awesome work so far! We are getting really close now so hang in there.

We now need to change the trigger for our Google AIY project kit so that it responds to our voice when we speak the words ‘OK Google’.

Type the following command into the dev terminal:

nano ~/.config/voice-recognizer.ini

This will produce this even scarier window.

Within this new window, look for the following code:

# Select the trigger: gpio (default), clap, ok-google.
# trigger = clap

We need to change this code to:

# Select the trigger: gpio (default), clap, ok-google.
trigger = ok-google

If you use the arrow keys on your keyboard you will notice a curser appears. Using the arrow keys, bring the curser down to the line of text that we are trying to change. Using the backspace key on your keyboard delete the line of text that we are trying to change and retype it just like the example above.

Notice that I have also removed the # symbol, it is important we do not include the # in this new line of text.

I have attached a before and after screenshot of what this should all look like (encase I lost you there).

Assuming your window looks exactly like mine we can close and save the changes. Hold ‘Ctrl’ on your keyboard and press ‘X’ to close the window. We will then be prompted to save the changes we made, press ‘Y’ and then hit ‘Enter’ on your keyboard. The window will now close and the changes have been saved.

To ensure the changes have taken affect we need to restart the service. Type the following command into the terminal window and hit ‘Enter’:

sudo systemctl restart voice-recognizer.service

Step 8: Audio Configuration (Part 1)

Picture of Audio Configuration (Part 1)

Right now Google Assistant more or less alive and ready to serve.. Congratulations!

However, before you get too excited, you cannot hear each other. That’s because the Google AIY Project Image was configured to work with the hardware that was shipped with the kit. Since we are using a standard aux speaker and usb microphone we need to tweak some of the configuration.

Once again we will use the same dev terminal window, this time type:

sudo leafpad /boot/config.txt

This will open a text window. Scroll to the very bottom of the document and remove the # in front the the line dtparam=audio=on and insert a # in front of the two lines below it.

After you have made these changes it should exactly like this:

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
#dtoverlay=i2s-mmap
#dtoverlay=googlevoicehat-soundcard

I have also attached a screenshot to show you what this will look like.

Go to ‘File’ then click ‘Save. You can now close the document.

Step 9: Audio Configuration (Part 2)

Picture of Audio Configuration (Part 2)

Back in the dev terminal again, type:

sudo leafpad /etc/asound.conf

When you hit ‘Enter’ a new text document will open. This time delete ALL the text within the document and replace it with the following:

pcm.!default {
type asym capture.pcm "mic" playback.pcm "speaker" } pcm.mic { type plug slave { pcm "hw:1,0" } } pcm.speaker { type plug slave { pcm "hw:0,0" } }

Again I have attached a screenshot showing you what this will look like.

Once again save and close the document.

Now it is time to reboot your Raspberry Pi. Click on the Raspberry Pi logo at the top left of your screen and click on ‘Shutdown’ then ‘Reboot’.

After you have rebooted the Pi we have just one more tweak to make. Double click on the ‘Start dev terminal’ icon once again and type the following:

leafpad /home/pi/voice-recognizer-raspi/checkpoints/check_audio.py

In this final document you need to locate the line of code that reads:

VOICEHAT_ID = ‘googlevoicehat’ 

Change this to:

VOICEHAT_ID = ‘bcm2835’

Once you have made these changes, just as we did before, save then close this document.

Step 10: Testing the Audio

Picture of Testing the Audio

On the desktop there is a file called ‘Check audio’. Double click on this and follow the prompts to ensure that both the speak and microphone is working.

If you followed this Instructable correctly there should be no problems. However if you cannot hear anything, double check that the volume is turned up and that your Raspberry Pi is using ‘Analog’ for sound output. You can do this by right-clicking on the sound icon at the top of the screen. ‘Analog’ should be ticked just like the example in the screenshot.

Assuming you passed the audio check, we can move onto the next step.

Step 11: Connecting to the Cloud

Before Google Assistant will give us answers to life’s burning questions we need to connect her to Google’s Cloud Services.

This is easy to do but if you haven’t been in the cloud before then it may seem a bit daunting at first.

Here’s what we need to do:

1) On the Raspberry Pi open up the Chrome internet browser and go to the Cloud Console: https://console.cloud.google.com/

2) Sign in with an existing Google account or sign up if you do not have one.

3) Create a new project and give it a name. I called mine ‘Google Pi

4) Using the search bar start typing ‘Google Assistant’ and you should see the ‘Google Assistant API’. Click on it and then when the next page loads click ‘Enable’ to activate the API.

5) Go to ‘API Manager’ then ‘Credentials’ and create an ‘OAuth 2.0 client’.

6) Click ‘Create credentials’ and select ‘OAuth client ID’. If you have never been in the cloud before then you will now be prompted to configure your consent screen. You’ll need to name your app, I called mine 'Raspberry Pi'. All other fields can be left blank.

7) In the Credentials list, find your new credentials and click the download icon on the right.

8) The chrome browser will now download a small JSON file with all your credentials stored safely inside. Find this file and rename it to ‘assistant.json’ then move it to /home/pi/assistant.json.

9) Finally, go to the Activity Controls page: https://myaccount.google.com/activitycontrols and turn on the following services: Web and app activity, Location history, Device information, Voice and audio activity. Be sure to log in with the same Google account as before!

If you got stuck at any point during this stage, do not freak out, Google has done an excellent job at documenting this process with screenshots for each step over on the Google AIY Kit website.

Step 12: Final Testing

Picture of Final Testing

If everything was setup correctly in the cloud we are now ready to talk to Google. Using the ‘Start dev terminal’ command window again, type the following:

src/main.py

This will wake up our assistant but since this is the first time that we are connecting to Google’s Services, a web browser will open and you will need to login to Google to give permission for the Raspberry Pi to access the Google Assistant API. Again making sure that you use the same Google account logins as you did before.

Once you have logged in successfully and granted permission you will be prompted to close the window. The command window will now look like the screenshot attached confirming that everything was setup correctly.

Go ahead, ask a question, she’s listening!

Before you get too excited though, we are not quite finished. When you have finished playing, close the window, to do this just use the white cross at the top right of the window.

Step 13: Setting Up Google Assistant on Startup

I promised you that our Google Assistant would startup automatically when we power up the Raspberry Pi. To do this, open a fresh command window using the ‘Start dev terminal’ icon on the desktop. Type the following line of code into your terminal window and hit ‘Enter’ on your keyboard:

sudo systemctl enable voice-recognizer

We just configured auto startup of our Google Assistant with one line of code.. How easy was that!!

Step 14: The Finish Line

Now that you have completed all the steps go ahead and reboot your Raspberry Pi. If you have followed all these instructions carefully then Google Assistant should be running in the background when the Pi loads up. Give it a try, say OK Google to wake her and ask her anything you like!

I really hope you liked this Instructable. It is a result of 2 days hard work and lots of online reading. I am definitely not a coder so I have tried to find the easiest and most logical way to get a working Google Assistant onto a Raspberry Pi and I believe this is it.

If you have any questions or suggestions with regards to this Instructable please let me know in the comments below. I would also love to hear how yours turned out.

I read a lot of tutorials, blog posts and forum entries but my biggest breakthroughs with this project came from 2 posts online that were both trying to accomplish similar tasks: http://eduncan911.com/stem/embedded/aiy-google-assistant-upgrades-may-2017.html and http://www.androidauthority.com/build-google-assistant-raspberry-pi-770296/. This Instructable is a result of figuring out how to put the two together in an easy and straight forward Instructable!

Extra Credits

- The Google Assistant SDK already has a huge number of features built-in however there are lots of 'mods' that you can add to the AIY Kit to give it some extra functionality. Ktinkerer has an up to date list of the latest mods available, check it out!Thank you cyberwolves for pointing this out :)

- How about a speaker enclosure for your squeeky new AI? Checkout this one by adylinn.

If you can think of anything else to add to this Instructable, please get in touch :)

Comments

kevin31466 (author)2018-01-06

So im at the final test when you type src/main.py and it gives me an error saying unknow trigger 'ok-google' anyone else have this problem. i did the step to add the ok-google to the file but not working

regtabb (author)kevin314662018-01-18

Hi kevin31466 - I get the same error message ERROR:main:Unknown trigger ‘ok-google’

Did you find a solution to this? I’m stumped!

AlejandroR3 (author)2018-01-14

This is a great tutorial! Thank you so much for it. I do have a question, if I want to use a mic/speaker combo do I need to make any changes to this installation?

ifb777 (author)2018-01-13

Many thanks for posting this great Instructable. Helped me get assistant running on a Pi3 with a minimum of fuss. The only problem I faced was the missing .asoundrc file mentioned by VinceW14, (thanks Vince). Keep up the good work.

VinceW14 (author)2018-01-12

In Step 10 I couldn't get my USB Microphone to work at all.

I eventually traced the problem to a missing step within your Step 9, the missing step is as follows:

After the "/etc/asound.conf" file is edited the corresponding and matching ".asoundrc" file, which is a hidden file in /home/pi, also needs to be changed to include the exact same text.

Suggested change to Step 9:

Immediately before the Reboot instruction add the following step:

In the dev terminal now type:

sudo leafpad /home/pi/.asoundrc

Another text document will open, once again delete all the text in this second document and replace it with excacly the same text as the previous document.

After making sure both files matched the Mic worked fine.

sebyd1 (author)2018-01-04

Hello , great project , it worked for my , but after the restart i got this error : Failed to import the site module.

MatthewW278 (author)2017-12-30

Has anyone used a Bluetooth speaker with built in microphone for this project?

Ttevogt (author)2017-12-24

great tutorial. I have an issue early on.... my build does not have the voice-recognized-raspy folder. I have the AIY Kit and downloaded the image in October per the guide.

Kingma (author)Ttevogt2017-12-27

That is a problem I had too. The downloadable image from the guide, and I guess you mean google's guide, uses a different name for the folder. In your downloaded image the folder is named: "AIY-voice-kit-python" instead of "voice-recognized-raspi". So when you need to use something in the voice-recognized-raspi folder, in a command for example, you need to replace "voice-recognized-raspi" with "AIY-voice-kit-python".

MaximilianS16 (author)2017-12-21

Hey, great tutorial! I got it working several days ago, but after setting it up to start on boot, restarting the raspberry pi results in me having to manually run src/main.py and then recieving this error message:

"[1177:1194:ERROR:audio_input_processor.cc(755)] Input error

[2017-12-21 07:43:48,148] INFO:root:ON_MUTED_CHANGED:

{'is_muted': False}

[2017-12-21 07:43:48,149] INFO:root:ON_START_FINISHED

[2017-12-21 07:43:48,151] INFO:main:ready...
Say "OK, Google" then speak, or press Ctrl+C to quit...

[2017-12-21 07:43:48,161] INFO:root:ON_ASSISTANT_ERROR:

{'is_fatal': True}

[1177:1195:ERROR:audio_input_processor.cc(755)] Input error

Segmentation fault"

When i run the audio check, both the speaker and mic works! How do i fix this? Any help would be appriciated

Funny, mine was just working and then after a reboot I am getting this exact error as well. I know I'm not crazy because my girlfriend also heard her working from the next room five minutes ago.

Looks like I'm getting this error because the voice-recognizer.service is already running. I had configured it to run at startup and had forgotten. So I didn't need to try src/main.py. Works now.

nyanpradeep (author)2017-12-06

Great project. Will be trying it this weekend. Just one thing before hand. Can the wake code be changed to anything other than OK google.....like maybe JARVIS etc

nyanpradeep (author)nyanpradeep2017-12-11

Hi Luke K ...Thanks to your tutorial I also made the same. I have the same issue with static and i dont think bluetooth speaker is a good answer as that will mean linking to bluetooth every-time i put the PI on (i put it off at night as there are power outages in India). Music is not working. But many things are working fine. Tried the "Jarvis" wake word and it did not work.

Anyway thnks a lot.

Jean-FrançoisL16 (author)2017-11-21

Bonjour,

Comment lui faire émettre un son de validation après l'acceptation de "OK-GOOGLE" ?

J'ai essayé avec le paramètre "trigger-sound" mais rien ne se passe ....

Avez vous une info à ce sujet ?

Merci.


MadisonF1 (author)2017-09-22

I'm having some troubles and was hoping to find a solution from somebody. I followed all the oauth instructions thoroughly. When i try to run main.py, i get the error:

File "src/main.py", line 30, in <module>

import auth_helpers

File "/home/pi/voice-recognizer-raspi/src/auth_helpers.py", line 21 in <module>

import google_auth_oauthlib.flow

ImportError: No module named 'google_auth_oauthlib"

I tried recreating my credentials to no avail. Hopefully i can find a solution.

LukeK1990 (author)MadisonF12017-09-22

Hi Madison, can you confirm the file name of the disk image you are using?

MadisonF1 (author)LukeK19902017-09-22

I'm not at home right now, but can i ask exactly which file you're referencing to? I can check when i get home.

LukeK1990 (author)MadisonF12017-09-22

It’s the disk image that you would have downloaded in step 2. Hopefully you downloaded the image called ‘aiyprojects-2017-05-03.img’ from my Google Drive? Or did you download ‘aiyprojects-2017-09-11.img’ from the official Google AIY website?

MadisonF1 (author)LukeK19902017-09-23

I did indeed download the correct image.

LukeK1990 (author)MadisonF12017-09-24

Hi Madison, I would suggest double checking everything in the cloud is setup correctly. There is a more detailed guide here: https://aiyprojects.withgoogle.com/voice/#users-gu...

Make sure you did not miss anything. If you still cannot get it to run, start over from scratch. You do not need to create new credentials in the cloud though, just start with a fresh image then download and move the .json file to /home/pi/assistant.json. Making sure you follow all the other steps in the Instructable in the right order. Sorry I cannot give you a precise answer!

MikeW108 (author)LukeK19902017-09-26

I'm getting the same message now!

I had it all working until I did the final step of enabling it on boot and then restarted the Pi.

Now I just get messages in daemon.log about voice-recognizer starting and then almost immediately stopping with an error.

Running main.py from the console gets the above error message

LukeK1990 (author)MikeW1082017-09-27

Hi Mike, sorry to hear that. I ran a fresh install this morning following each of the steps in this Instructable and I did not have any problems with autostart or voice-recognizer. I would suggest a fresh install taking extra care to follow every step precisely. If you are still getting the same error it can only be hardware. If it helps, I am using the following:

USB Mic: https://www.amazon.co.uk/gp/product/B00IR8R7WQ/

Raspberry Pi 3: https://www.amazon.co.uk/Raspberry-Pi-Official-Des...

Aux Speaker: https://www.amazon.co.uk/Betron-Wireless-Portable-...

I hope you get it up an running, sorry I cannot give a concrete answer.

BobL45 (author)LukeK19902017-11-19

did anyone ever find a fix for this , getting the exact same error here , definitely using the right image.

MikeW108 (author)BobL452017-11-20

As others have said - you need to use the "dev terminal" from the desktop and NOT a regular terminal emulator.

dsegel (author)MadisonF12017-10-06

This is likely an environment error - make sure you're using the Dev Terminal from the desktop, and not a regular terminal from the menu or menu bar. The PATH is different.

cyberwolves (author)2017-11-03

Hi Luke iv Made a acrylic enclosure https://www.youtube.com/watch?v=RwEUgeOBNx0

siderio2 (author)2017-10-28

Thanks a lot for this great tutorial, Luke!!

But I'm not making it work :(

When I try the audio check step, the only response I get is a terminal opening and immediately closing. I saw a comment where the same happened to another guy, but it worked anyway. Sadly, that's not my case, because when I run src/main.py, it shows this error message:

[1813:1834:ERROR:audio_input_processor.cc(755)] Input error

[2017-10-28 23:00:26,726] INFO:root:ON_MUTED_CHANGED:

{'is_muted': False}

[2017-10-28 23:00:26,727] INFO:root:ON_START_FINISHED

[2017-10-28 23:00:26,728] INFO:main:ready...

Say "OK, Google" then speak, or press Ctrl+C to quit...

[2017-10-28 23:00:26,730] INFO:root:ON_ASSISTANT_ERROR:

{'is_fatal': True}

Anyone can help, please???

Thanks in advance.

kbear99 (author)2017-10-25

Luke, thanks for this awesome instructable. As a linux noob I understood almost none of what I was doing yet it still worked perfectly, so you did an amazing job.

I did have an initial hiccup, but that was because of my own errors. The following additions to your instructions might help others like me.

1) Step 5: Do NOT use the regular terminal. Use only the Start dev terminal icon.

2) Step 11: When creating credentials, the Application Type should be 'Other'. Also, the AIY Kit website cannot be viewed in Firefox, so choose another browser. (I thought the site was down but it turned out to be the browser).

kishorek24 (author)2017-10-24

Thanks

SimonF90 (author)2017-10-22

hey great tutorial, so far ive only had one issue and that is with the sound, analog is ticked, ive gone back into the sound files that were edited and its the exact word/code for word/code. i am using the PI2 mod b. i have not gone passed this step. thanks for your help in advanced. using hdmi to monitor.

SimonF90 (author)SimonF902017-10-22

figured it out :) went into preferences/audiodevice settings/ select controls/ selected PCM and made it default and it came through :)

LukeK1990 (author)SimonF902017-10-22

Hey Simon, glad you got it sorted.. Congrats. And thanks for posting the solution for others to see :)

SimonF90 (author)SimonF902017-10-22

i forgot to mention, no sound is playing when the check sound is executed. i have also tried playing audio through youtube and im getting nothing at all. either my audio track on the pi is busted or ive macked it :P

BradS3 (author)2017-10-21

Just completed this. It took me like six tries. But it was no fault of the tutorial. I am using Adafruits Speaker Bonnet instead of a speaker via the Aux port. Turns out the Speaker Bonnet works out of the box with the AIY so all I had to change in the config file was to add my microphone and to leave the VOICEHAT_ID as is. The rest of it was the same. So cool! Unfortunately the cost is pretty much moot now that the Google Home Mini is out. Great job @creator!!!

LukeK1990 (author)BradS32017-10-22

Hey Brad, congrats on getting it setup. Are you running it on a Pi Zero with the speaker bonnet?

BradS3 (author)LukeK19902017-10-22

I didn't use a Pi Zero... but I could try one out.

LukeK1990 (author)BradS32017-10-22

That’s ok, I just wondered as I looked up the speaker bonnet and see that it’s traditionally used with the Zero. It looks good I may invest in one and see if I can build some sort of enclosure for it.

DigiM4x (author)2017-10-20

Why is it that I have to have a button to speak or ground pin 23 to talk?

LukeK1990 (author)DigiM4x2017-10-21

If you follow the instructions you do not need a button to talk. The hands free function is available after you update the installation as per the steps

wstewl (author)2017-10-16

Thank you! It works!

LukeK1990 (author)wstewl2017-10-17

Congrats :)

TaiN23 (author)2017-08-20

Very nice instruction! Thanks!

I got it working though the audio quality is a bit bad. I hear static when no audio is played or before and after audio is played.

Also, have you got any luck to get it to play music from raspi? "Hey Google, play music" for example?

I tried and it said something like "playing music is not supported on this device"

LukeK1990 (author)TaiN232017-08-21

Hey TaiN23, congrats on getting it up and running!

At first I also had an issue with audio quality, I believe this may be interference. If you move the speaker away from the Raspberry Pi does that resolve the issue? That was certainly the case for me. Also if you have a Bluetooth speaker like mine you could try running the audio through that instead.

With regards to playing music, unfortunately it is not yet supported by the Google AIY project. You can follow the project for updates here: https://github.com/google/aiyprojects-raspbian

Lots of features have been added since the first release and there is still a lot of hard work being put into it. So I expect this will be added at a later date. When the next big update arrives I will post instructions on updating the installation without having to start from scratch.

Let me know how you get on with that audio..

TaiN23 (author)LukeK19902017-08-21

Hi Luke,

Thanks for the advice. I'll try use a longer aux cable. Something else was strange is that if i boot the raspi without hdmi cable plugged in, the speaker produces loud static and stops working!

My speaker has bluetooth as well, so I'm trying to setup with this https://www.raspberrypi.org/magpi/bluetooth-audio-... but having some issue when testing with youtube video. Do you have another instruction to follow?

I need to play around a bit. First time I get my hand on this much technical stuffs!

Will update if i make any progress.

LukeK1990 (author)TaiN232017-08-22

Hey TaiN

I have been working on this today but so far I have had little success. I did get the Bluetooth speaker working. The problem is that when the audio is going through Bluetooth, the microphone stops working.

I will keep working on this but in the meantime if you figure it out then please let me know and I can add it to the end of the Instructable for others that want to use Bluetooth as well.

TaiN23 (author)LukeK19902017-08-23

Hi Luke,

I haven't had much luck with the bluetooth speaker. Which guide are you using?

I am following this guide: http://youness.net/raspberry-pi/bluetooth-headset-... . It connects as output only, and only work with audio file. I could not play anything streamed from the internet (youtube, podcasts...)

Let me know how it goes for you.

Tai

AviW1 (author)TaiN232017-10-02

ummm, guys? the AUX of raspberry pi has REALLY HORRIBLE quality. So do what I do, use an HDMI to VGA + AUX converter and connect your AUX speaker to your Raspberry Pi through that!

LukeK1990 (author)AviW12017-10-17

Nice idea, thank you for pointing that out!

LukeK1990 (author)TaiN232017-08-25

Hi Tai,

I did get the bluetooth speaker working eventually (both speaker and microphone) however I could not get it to work with the assistant. Oddly it did work with the 'Check audio' test on the desktop but for some reason the assistant would not respond. I will try again this weekend but I am hoping a very nice Instructable user with more experience than me sees this and comes to our rescue!

This is the guide that I used to get the speaker working: http://plugable.com/2016/03/14/listening-to-blueto...

I think the reason it does not working with the assistant itself is to do with the configuration that we setup in 'Step 9: Audio Configuration (Part 2)'. I think that would need tweaking slightly for a Bluetooth instead of Aux.

Let me know if you find anything else in the meantime. It would be great to add the Bluetooth option to this Instructable.

About This Instructable

48,160views

641favorites

License:

Bio: Nerdy, Quirky, 3D Obsessed.. If you have a question regarding one of my Instructables please ask, I am happy to help!
More by LukeK1990:Design and Print the Instructables RobotHands Free Google Assistant for Raspberry PiSpace Rocket Fidget Spinner
Add instructable to: