【 Create Google Home with Raspberry Pi 】 Step by Step Guide ▷ 2022

if there is something has characterized these plates is their large number of usesOne of them is the possibility of turn them into an assistantin this case we will explain how to turn it into a

Google Home is the easiest way to have Google Assistant at home, and despite being a platform that is not available worldwide, thanks to the you can have it at home and even control anything you connect to the plate with your voice.

This is how we are going to explain to you below what is the procedure so you can start turn your microcomputer into a voice assistant in an easy and fast way.

What do I need to turn my Raspberry Pi into a Google Home device?

If you are looking for a way to turn your microcomputer into a voice assistant as it is Google Assistant, then you have to keep in mind that you will need some hardware. For this you will need to use a microphone and speaker that allows you to communicate with Google Assistant. You will also need to have a Raspberry Pi 2, Pi 3 or Pi 4 board, being the last two mentioned the most recommended. When you have all this ready, you can start this procedure.

Learn step by step how to create a Google Home smart speaker with a Raspberry Pi from scratch

At this point it is important to mention that there are two ways in which you can create a google home smart speaker from scratch.

To do this, just follow each of the methods that we are going to teach you below:

Using MagPi’s AIY Voice Kit

It must be borne in mind that in The 57th issue of The MagPi, Google includes a kit to encourage users to create their own google homethis project received as name AIT Voice and which was a mixture between what is the artificial intelligence and DIY What does do it yourself mean? Therefore, if you have this kit or plan to buy it, you will be able to use it by mediating each of these steps.

Assemble the AIT Project kit

Note that This kit is quite easy to assemble so you shouldn’t have any inconveniencehere you must follow each of the instructions that you will find on the AIY Projects website https://aiyprojects.withgoogle.com/voice/.

In order to build this Kit, Google will provide you with the following:

  • An elongated PCB board with two microphones.
  • A PCB board to control the microphones and the push button (Voice HAT).
  • A LED.
  • A Push Button.
  • A speaker.
  • Cables to connect everything.
  • A cardboard box to assemble the kit.
  • Mechanism for the push button.

However, all the components that the kit offers you are enough, so you will need to place the following:

  • a raspberry Pi 3 or Pi 4.
  • micro SD card to install the operating system.
  • A screwdriver.
  • Headband adhesive.
  • Remember that You will find all the instructions to assemble the kit on its official websitebut here we are going to summarize the steps so that you can do this in a very simple way.
  • When you have all the necessary components, next will be to start by connecting the PCB boardcall voice hat and which controls the microphones and the button on the Raspberry Pi 3 in this case, for this you can lean on the two small plastic risers. Now with the help of the screwdriver you must connect the two speaker cables, keep in mind that the red is positive and the black is negative.
  • The next thing you should do is connect the rest of the cables to the board. After this it will be the right time to place everything in the first cardboard, for this you must fold it leaving the instructions visible and place the speaker first, then place the Raspberry Pi 3 With the voice hat. Now you are going to assemble the boxes and insert the whole set, be careful that the speaker is in the part where the holes are.
  • Once this point is reached, it is time to fix the push button casing. The first thing will be to unscrew the black plastic nut, then you are going to insert the button through the hole in the lid and screw the black nut back on. The next thing will be to assemble the mechanism with The led and the button. Here you are going to have to fit it into the push button and connect the wires carefully and in the correct order (Red and blue go on the outside, black and white in the center).
  • To finish this step, you need to connect the board with the two microphones and then put some adhesive tape on it above the lid. Take care to position the microphones so that they have good sound input through the holes in the cabinet. When everything is assembled and ready, the next thing to do is to install the software in the micro SD card.
See also  【 Know Who Pays for Online Ads 】 Step by Step Guide ▷ 2022

Install and configure Raspbian to use Google Assistant

It will require several stepsone of them is to download the system image and flash it on the micro SD with a computer.

Here you will have to follow each of these steps:

  • The first thing will be to download the image for the Voice Kit micro SD from this link.

  • Then you must download the software Etcher.oi for computer.

  • After this you will have to unzip the file with the operating system image for the Raspberry Pi.
  • Now insert the micro SD card in the computer.
  • Then open the program etcher, there select the image, select the micro SD and click on “Flash”.
  • When I’m done, you’re going to have to remove micro SD card which is going to be ready to be inserted in the plate.

At the end of the process of flash card it will be placed on your mini PC to start with. In order to boot the board with the Voice Kit it will be necessary to have a monitor with HDMI cable and a keyboard with a mouse, you connect all of them and finally you connect it to the power so that it turns on the microcomputer. Keep in mind that the first start of the system can take several minutes, the system that runs on the mini PC is a version debian specially modified for this type of plates and is known as Raspbian.

When keep the desktop active, in the upper right part you will be able to connect to the WiFi network between the Bluetooth and volume symbols. Being connected to the Internet, the browser will open and there you will have to enter this URL: https://console.cloud.google.com/. There you will be asked to enter your with which you will use Google Cloud serviceswhere is Google Assistant which interests you To do this, enter your email and password so that you can access the service that is totally free.

See also  【Play Blu-Ray on Computer】Easy Guide ▷ 2022

To do this, follow each of these steps:

  • The first thing will be create a new projectit can be called for example Home Pi.
  • Here you will activate the Google Assistant APIs in the project under API > Enable API > Google Assistant > Enable.
  • then you will have to create a new credential via this path: Credentials > Create credentials > OAuth Client ID > Other (add name) > Create.
  • After this you will have to download the credential on the microcomputer from the API credentials page of your project. On the right side of the credentials you just created you will find a button to “Discharge”.
  • Later you will have to copy the downloaded file from the download folder to the /home/pi/ folder and rename it by right-clicking on the file > rename to json.

Talk to Google Assistant using the Raspberry Pi 3

Once here, you will have to launch the wizard on the board, for this you will open the terminal icon that will appear on your desktop and enter the following command:

If this is the first time you are running this command, then it will ask you for the necessary permissions to be able to use your account Google Cloud which will be associated with Gmail. If everything went well on the console, then a warning will appear where it informs you that to speak you must first press a button.

If you want to exit the application you will have to press Ctrl+C with the terminal window active. After this you will be able to ask everything you want, in order to control the volume you can do it from the desktop icon in the upper right part or tell Google “Volume down”. In this way you will be able to enjoy this voice assistant from your Raspberry Pi through this kit.

See also  【 Work in Spreadsheets in Excel 】 Step by Step Guide ▷ 2022

Build your own Google Home with a speaker and a Raspberry Pi

In case you don’t want to use AIY Voice Kit, but you want to create it yourself, then you will only need the Raspberry Pi 3 previously used, as well as a USB microphone, speakers with mini-jack and a Raspberry Pi 3, if you want optionally you can connect a button. In the case of the software installation you can follow the same instructions already mentioned above, but in this case some details will have to be changed so that you can use your own hardware.

The first thing in this case will be to edit the file /boot/config.txt via terminal using the command sudo/nano /boot/config.txt. Here you will have to remove the comment on the line where it says #dtparam=audio=on erasing # and the following two will be commented leaving the paragraph as follows.

When it’s done, you’ll have to press Ctrl + X to exit and save with the same name:

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

Subsequently you are going to edit the file /etc/asound.conf, this will do too from the terminal with sudo nano /etc/asound.confi. here you go to delete everything and paste the following code.

Then “Ctrl + X” so you can exit from there and save everything with the same name:

!default { type asym pcm “mic” pcm “speaker” } mic { type plug slave { pcm “hw:1,0” } } speaker { type plug slave { pcm “hw:0,0” } }

At this point it will be time to reboot the raspberry pi 3 and there you will be able to prove that it recognizes the microphone and the speakers. On the desktop you will find a file called “Check audio” if you double click on it we will see that look for the Voice HAT you don’t have.

In this way you are going to modify it, write in the terminal the command sudo nano /home/pi/voice-recognizer-raspi/checkpoints/check_audio.py, and in the line where it says VOICEHAT_ID = googlevoicehat you are going to change it to VOICEHAT_ID = bcm2835. This will allow you to get the perfect Raspberry default sound, to exit and save press the keys “Ctrl + X” and finally test the audio again and there everything should work correctly.

If you have a button you will have to connect it to GPIO 23, and if you don’t, then you will start the service as in the previous step with a special command:

  • python3 src/main.py –T clap

With this command you will get that Google Assistant answer you every time you ask a question. If you want to exit you can do it by pressing the keys Ctrl+C.

Loading Facebook Comments ...
Loading Disqus Comments ...