Use commands and sample programs for How-to-make video instruction.
Raspberry Pi Zero & Seed Respeaker | RasPi Camera | Mini speaker |
---|---|---|
LiPo Battery | Slide Switch | RasPi Zero Case |
a. Set camera with RasPi in the case
b,c. Apply library and take a picture
$ sudo pip install picamera
$ sudo raspistill -o image.jpg
a. Connect ReSpeaker to RasPi
b. Downlaod and install Seeed library
$ git clone https://github.com/respeaker/seeed-voicecard.git
$ cd seeed-voicecard
$ sudo ./install.sh
$ reboot
c. Check Speaker and Mic
$ aplay -l
$ aplay /usr/share/sounds/alsa/Front_Center.wav
$ arecord -l
$ arecord voice.wav
$ aplay voice.wav
a,b. Assemble RasPi, ReSpeaker, Battery to the case
c. Setup button and LED with ReSpeaker sample programs
$ sudo pip install spidev
$ git clone https://github.com/respeaker/mic_hat.git
$ cd mic_hat
$ python pixels.py
a,b,c. Download AquesTalk
$ wget https://www.a-quest.com/archive/package/aquestalkpi-20130827.tgz
$ tar xzvf aquestalkpi-*.tgz
a. Go to Google Cloud and setup API
- Download Google certificate and apply in Raspberry Pi
$ sudo nano ~/.bashrc
Add GOOGLE_APPLICATION_CREDENTIALS="/home/pi/visionxxx.json"
$ echo $GOOGLE_APPLICATION_CREDENTIALS
b. Install Google libraries and Vision API
- Google required libraries
sudo pip install httplib2
sudo pip install --upgrade google-api-python-client
- Setup Google Vision
sudo pip install --upgrade google-cloud-vision
- Setup Google Translate (Optional)
pip install --upgrade oauth2client
pip install --upgrade google-cloud-translate
$ git clone https://github.com/ktrips/RasAi.git
or
$ sudo mkdir ~/RasAi ~/RasAi/image
$ cd ~/RasAi
$ wget https://github.com/ktrips/RasAi/blob/master/vision.py https://github.com/ktrips/RasAi/blob/master/button_vision.py
File structure is as below:
/home/pi/vision.json
/home/pi/RasAi/image/
/home/pi/RasAi/aquestalk/
/home/pi/RasAi/vision.py
/home/pi/RasAi/button_vision.py
$ python button_vision.py
if push the button once, detect label (--detect label),
else if hold the button then check smile face (--detect face)