Read the statement by Michael Teeuw here.
A magic mirror based on Raspberry Pi3B, Respeaker sensor and google assistant (Tutorial Inside)
-
I did a magic mirror with ReSpeaker 4 Mic Linear Array to add voice interface to a Magic Mirror. It is very interesting. Children like it so much. hahah
As using a 4 Mic Linear Array, we are able to detect sound Direction of Arrial (DOA) which can be used to provide some creative functions. We can use beamforming to enhance a specific direction’s sound. It is really a good sensor to do voice related projects. The link is as below.
respeaker-micMaterial:
Raspberry Pi 3B
ReSpeaker 4 Mic Linear Array(sound card)
HDMI display
two way mirror
frame
SD card
Raspberry Pi 3B
ReSpeaker 4 Mic Linear Array(sound card)
HDMI display
two way mirror
frame
SD card:grinning_face_with_smiling_eyes:
Software Tutorial for you
Setup Raspberry Pi
Download a customized pi image, which includes the sound card’s driver and some voice related packages (Do not use the lite version for we need desktop enviroment to show GUI). We can write the image to a SD card with rufus (very tiny but only for windows) or ether.
If you don’t have any extra keyboard to access and configure the Raspberry Pi, you can setup WiFi configuratio and enable SSH before first time boot. To do that, Juse add a file named ssh to the boot partition of the SD card, which enables SSH, and then create a file named wpa_supplicant.conf with the following content, replace ssid and psk with yours
country=GB ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="WiFi SSID" psk="password" }
Power on your Pi, use Pi’s IP or raspberry.local(requires mDNS support, need to install Bonjour on Windows) to login via ssh (On Windows, putty is a handy ssh client).
Install Magic MirrorTo install Magic Mirror software package, just run:
bash -c "$(curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)"
This command will clone MagicMirror repository from github to ~/MagicMirror, install node, npm and other dependencies.Note: Do not use apt install to install node and npm, node and npm in the deb repository is kind of outdated. Remove them if already installed.
Install Magic Mirror modules: MMM-Remote-Control and MMM-kalliopecd ~/MagicMirror/modules git clone https://github.com/kalliope-project/MMM-kalliope.git git clone https://github.com/Jopyth/MMM-Remote-Control.git cd MMM-Remote-Control npm install
and then add the configuration of MMM-Remote-Control and MMM-kalliope to moddules of
~/MagicMirror/config/config.js
{ module: "MMM-kalliope", position: "upper_third", config: { title: "", max: 1 } }, { module: 'MMM-Remote-Control' // uncomment the following line to show the URL of the remote control on the mirror // , position: 'bottom_left' // you can hide this module afterwards from the remote control itself },
restart MagicMirror to enable the new configuration. Use the following command to test if we can send a message to MagicMirror
curl -H "Content-Type: application/json" -X POST -d '{"notification":"KALLIOPE", "payload": "my message"}' http://localhost:8080/kalliope
Configure Weather moduleBy default, a weather module using OpenWeatherMap is included, we need sign up OpenWeatherMap to get a API key and fill the key to
~/MagicMirror/config/config.js
Set Google Assistant
Go to Introduction to the Google Assistant Library to install and setup Google Assistant Library
After authorization, we can just run
mirror_with_google_assistant.py
to start the Google Assistant for the Mirror. -
@rosley-ge said in A magic mirror based on Raspberrt Pi3B, Respeaker sensor and google assistant (Tutorial Inside):
respeaker-mic
wow, looks great. I’ve no expirience connecting any HW to RPi. Can u plese give StepByStep how to connect Mic+Repro?
thanks, Zdeněk
-
Zdenek,
Don’t worry. It is very easy. The respeaker mic sensor has many detailed connection guidance. You can visit respeaker wiki first.
Respeaker-wiki
If you have any question, I am happy to share my experience. -
Hi,
Looks beautiful.
Where I can download the image from? Thanks. -
Interesting!
Are MM and GA independend or can you influence MM with GA (like showing or hiding modules)?
I think I made my mirror in the same way.
I have the original Google AIY kit in my MM.
They work independend: I can ask Google any kind of questions, set timers and turn on the gardenlights and the fountain in the pond with my voice.
But I cannot hide or show modules with voice.
I am very interested in integrating MM and GA, but I do not know how.
Peter -
@canadrian Just download it from Raspberry Pi official website. It is convenient.