Handmade Alexa Festival! Serverless, Invitation to IoT + Voice. Raspberry Pi + Alexa Voice Servce (Python)

Introduction

This article was posted on the 19th day of Serverless Advent Callender 2016.

We will have an Alexa festival at Cheap Echo.

IMAGE ALT TEXT HERE

the term

Alexa A voice recognition platform provided by Amazon.

AVS(Alexa Voice Service) Alexa's speech recognition engine. It is in Amazon Echo.

Alexa has two components.

background

In the background of writing this article, the skill of Amazon Echo has not passed yet. , ** There is a sad reality that you can't buy it in Japan **. There are web-based test tools like Echosim.io, but if Echo doesn't come, you can make your own and develop your Serveless skills. Let's have fun

Overview

Material (hardware)

Material (library)

Preparation

There is a sample for Raspberry PI in the official Amazon repository. Let's get startedのSTEP3まで完了させます。

You will get the profile (ProductID, ClientID, ClientSecret) that connects the device to the AVS.

Hardware setup

Set up the Raspberry PI 3. Installing operating system image

Software setup

hyper

$ pip install hyper

snowboy

$ sudo apt-get install swig3.0 python-pyaudio python3-pyaudio sox pip install pyaudio
$ sudo apt-get install libatlas-base-dev
$ cd/swig
$ make

You can install it yourself as above, but it's easier to copy it to your Raspberry Pi because it has a precompiled module. Precompiled module

Introduction of AVS

Once setup is complete, you will receive a credits.py with the security profile obtained from Developper.amazon.com.

スクリーンショット 2016-12-18 11.07.53.png

Start-up

$ python wakeword_detector.py

If you register it as a daemon, you can put it in the wakeword waiting state at startup.

demo

https://www.youtube.com/watch?v=Ghn1NpbUPJQ

at the end

I'm really sorry that the recognition rate is too bad due to bad pronunciation and the position of the microphone inside m (_ _) m

Recommended Posts

Handmade Alexa Festival! Serverless, Invitation to IoT + Voice. Raspberry Pi + Alexa Voice Servce (Python)
Connect Raspberry Pi to Alibaba Cloud IoT Platform with Python
[Raspberry Pi] Changed Python default to Python3
How to use Raspberry Pi pie camera Python
Connect to MySQL with Python on Raspberry Pi
From setting up Raspberry Pi to installing Python environment
Easy IoT to start with Raspberry Pi and MESH
How to use the Raspberry Pi relay module Python
Output to "7-segment LED" using python on Raspberry Pi 3!
Raspberry Pi + python + IoT device, environment construction procedure to start image processing and machine learning
Update Python for Raspberry Pi to 3.7 or later with pyenv
Run AWS IoT Device SDK for Python on Raspberry Pi
Translate I2C device driver for Arduino to Python for Raspberry pi
Introduced python3-OpenCV3 to Raspberry Pi
I talked to Raspberry Pi
Introducing PyMySQL to raspberry pi3
Raspberry Pi + Python + OpenGL memo
raspberry pi 1 model b, python
I want to run the Python GUI when starting Raspberry Pi
Use python on Raspberry Pi 3 to illuminate the LED (Hello World)
How to play music (wav / mp3) files on Raspberry Pi python