← Parent Directory

Amazon Alexa on M5Core2

Amazon Alexa for M5Core2(ESP32)

0. Briefing of Alexa

Amazon Alexa, also known simply as Alexa, is a virtual assistant technology largely based on a Polish speech synthesiser named Ivona, bought by Amazon in 2013. It was first used in the Amazon Echo smart speaker and the Echo Dot, Echo Studio and Amazon Tap speakers developed by Amazon Lab126. It is capable of voice interaction, music playback, making to-do lists, setting alarms, streaming podcasts, playing audiobooks, and providing weather, traffic, sports, and other real-time information, such as news. Alexa can also control several smart devices using itself as a home automation system. Users are able to extend the Alexa capabilities by installing “skills” (additional functionality developed by third-party vendors, in other settings more commonly called apps) such as weather programs and audio features. It uses automatic speech recognition, natural language processing, and other forms of weak AI to perform these tasks.

Most devices with Alexa allow users to activate the device using a wake-word (such as Alexa or Amazon); other devices (such as the Amazon mobile app on iOS or Android and Amazon Dash Wand) require the user to click a button to activate Alexa’s listening mode, although, some phones also allow a user to say a command, such as “Alexa” or “Alexa wake”.

1. Introduction

Source Code is here

Alexa Logo

Amazon Alexa on M5Core2 and M5Core2 for AWS

You can use M5Core2Alexa like using a real Amazon Echo (sometimes, not always). You can ask M5Alexa questions like “Alexa, what time is sunrise?” or ask her into Japanese 「アレクサ、今何時ですか?」, or maybe you can control your lights and fans (I don’t have any Alexa-supported IoT devices).

2. Development Setup

This sections talks about setting up your development host, fetching the git repositories, and instructions for build and flash.

2.1 Host Setup

You should install drivers and support packages for your development host. Windows, Linux and Mac OS-X, are supported development hosts. Please see Get Started for the host setup instructions.

2.2 Getting the Repositories

git clone --recursive https://github.com/espressif/esp-idf.git

cd esp-idf; git checkout release/v4.2; git submodule init; git submodule update --init --recursive;


cd ..

git clone https://github.com/IcingTomato/AlexaM5Core2.git

2.3 Building the Firmware

cd AlexaM5Core2/examples/amazon_alexa/ 

export ESPPORT=/dev/ttyUSB0 (or /dev/ttycu.SLAB_USBtoUART macOS or COMxx on MinGW)

export IDF_PATH=/path/to/esp-idf

. $IDF_PATH/export.sh

Set audio_board path for M5Core2 and AWS_EDUKIT_PATH:

export AUDIO_BOARD_PATH=/path/to/AlexaM5Core2/components/audio_hal/audio_board/audio_board_m5_core2_aws
export AWS_EDUKIT_PATH=/path/to/AlexaM5Core2/components/core2forAWS

Menuconfig is avaliable, also you can change some components:

idf.py menuconfig

3. Configuration Steps

Here are the steps to configure the M5Core2:

App Home
App Discover Devices
App Sign-in
App Scna List App Wi-Fi Password
App Things To Try

4. Troubleshooting

4.1 Music and radio playback (Audible or Podcast) are not supported on this device.

According to Espressif Official, music and radio playback (Audible or Podcast) services are not supported on Non-Amazon-Official products. Unfortunately, Amazon music functionality needs whitelisted product. Only the commercial products are whitelisted by Amazon. Let us know if you are going to commercialise it.

4.2 Alarm Dismiss doesn’t take effect.

When the alarm on, you cannot say “Alexa, stop alarm” to dismiss the alarm. I dno’t know why… So, if you want to stop the alarm, you can touch the middle “button” on M5Core2. The middle “button” can also wake up Alexa.