Project tutorial
ReSpeaker Home Automation

ReSpeaker Home Automation © GPL3+

ReSpeaker Home Automation Sample using Arduino MKR1000, Microsoft Cognitive Service Speech API, Api.ai and MQTT

  • 10,871 views
  • 1 comment
  • 22 respects

Components and supplies

Apps and online services

About this project

Probably you all heard about ReSpeaker, it is a hackable open hardware voice inteface. It is a development board based on Mediatek’s MT7688 WiFi module and runs on OpenWrt. You an program it using Arduino, Python, Node.js, Lua and C/C++. ReSpeaker also supports various hardware add-ons like Groove Expansion, Microphone Array, etc... I am one of the early beta user of ReSpeaker. Here is a link to the Kickstarter Page.

https://www.kickstarter.com/projects/seeed/respeaker-an-open-modular-voice-interface-to-hack?token=fe8b1f79

ReSpeaker supports speech recognition using Microsoft Cognitive Service, Amazon Alexa Voice Service, Google Speech API, Wit.ai, Houndify, etc...

Here is a Home Automation project I worked using ReSpeaker, Microsoft Cognitive Service Speech API, Api.ai and MQTT, it controls the lights using voice interface. Basically what it does is, record audio using ReSpeaker, convert to text using Microsoft Cognitive Service Speech to Text, process and the text using Api.ai conversational voice interfaces platform, send MQTT messages to turn on/off different lights.

The project has two hardware components, ReSpeaker and Arduino MKR1000 to which two LEDs are connected (these LEDs represents different lights).

ReSpeaker recognize the user voice input using Microsoft Cognitive Service Speech API. If a trigger word is detected (configurable), the application turns on the LEDs on the ReSpeaker and then listens for commands. The trigger word I use for this demo is "jarvis", but you can using any word you want. For no reason I am using this word. Here is and example of conversation:

  • Jarvis, turn on turn bedroom light
  • Jarvis, turn off turn bedroom light
  • Jarvis, turn on turn kitchen light
  • Jarvis, turn off turn kitchen light

Here is a pictorial representation of the application flow

Parts List

Setting up ReSpeaker

Follow this document to get started with ReSpeaker

Using the application

  • Wire up the Arduino MKR1000 as per the schematics below
  • Open Arduino IDE and flash the ha.ino to MKR1000
  • Connect your ReSpeaker to the network
  • SSH to your ReSpeaker
  • Create a folder to clone the project files
  • Got to respeaker folder
  • Get an API Key and replace the variable BING_KEY in the Python Script creds.py .
  • Create and account or log on to Api.ai
  • Get Access Token and replace the variable APIAI_TOKEN in the Python Script creds.py
  • Open Arduino IDE and load respeaker_ha.ino`. Flash this application to your ReSpeaker
  • Got to respeakerha\respeaker folder
  • Install required Python package paho-mqtt using pip install paho-mqtt
  • Install required Python package monotonic using pip install monotonic
  • Run start_recognize.py using python start_recognize.py
  • Say jarvis and wait for the lights on your ReSpeaker to turn on
  • Say `turn on bedroom light/turn off bedroom light/turn on kitchen light/turn off kitchen light

If everything OK, you can turn on/off the lights using voice input.

Schematics

Demo Video

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

Code

Github
https://github.com/krvarma/respeakerha
Github
https://github.com/respeaker/get_started_with_respeaker/wiki

Schematics

Schematics
Schematics

Comments

Similar projects you might like

Home Automation with Arduino MKR1000 and Windows 10

Project tutorial by Ioannis Kydonis

  • 9,290 views
  • 1 comment
  • 31 respects

Android App-Based Home Automation System Using IOT

Project tutorial by Team Autoshack

  • 24,858 views
  • 17 comments
  • 75 respects

Octopod: Smart IoT Home/Industry Automation Project

Project tutorial by Saksham Bhutani

  • 7,037 views
  • 8 comments
  • 30 respects

Home Automation Using Zone Beacon via Android App

Project tutorial by Team SomeRandomTeam

  • 1,573 views
  • 2 comments
  • 13 respects

Home Automation Using Raspberry Pi 2 And Windows 10 IoT

Project tutorial by Anurag S. Vasanwala

  • 297,296 views
  • 98 comments
  • 706 respects

Smart Garbage Monitoring System Using Arduino 101

Project tutorial by Technovation

  • 22,735 views
  • 7 comments
  • 37 respects
Add projectSign up / Login