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.
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
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
- Move to the folder and close the repo https://github.com/krvarma/respeakerha.git
- Got to respeaker folder
- Create an account or log on to Microsoft Cognitive Service Speech API](https://www.microsoft.com/cognitive-services/en-us/speech-api).
- Get an API Key and replace the variable
BING_KEY
in the Python Scriptcreds.py
.
- Create and account or log on to Api.ai
- Get Access Token and replace the variable
APIAI_TOKEN
in the Python Scriptcreds.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
usingpip install paho-mqtt
- Install required Python package
monotonic
usingpip install monotonic
- Run
start_recognize.py
usingpython 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
Comments