Abstract
The Internet of Things is used in a wide range of applications, and in combination with smart home devices (such as electrical appliances, air quality detectors, thermometers, and air conditioners) can make your home smarter.
In this tutorial we will show you how to use QBoat Sunny to enable voice control.
Requirements
- QBoat Sunny
- Microphone
- Speakers
- 2x MediaTek LinkIt 7697 (One as a sensor, the other as a controller)
- DHT11 Temperature and humidity sensor
- Controllable outlet plug with relay
- DuPont cable
- Container Station with a Ubuntu LXC container (For more information on using Container Station, refer to https://www.qnap.com/en/how-to/tutorial/article/how-to-use-container-station)
Diagram
The Python program will run on the Ubuntu LXC container to process speak recognition, and will use eSpeak as broadcasting.
Voice recordings will be sent to the Google Speech to Text API to convert them to plain text. The plain text will be transferred to DialogFlow (an online service) for natural language processing.
The DHT11 will acquire the temperature and humidity value every two seconds to power the relay on/off using the designated topic via MQTT from QBoat Sunny.
Hardware circuit
Software
LinkIt 7697:
<< linkit7697_ino_code/MQTTRelay.ino>>
Node-RED:
Refer to the following image. You can download and import this file to QIoT Suite Lite.
<<QIoT_export/MQTTHome.json>>
Python:
<< speak/mqtt.py >>
Code:
https://github.com/blackmesataiwan/qboat_voice_control
We hope you have enjoyed this tutorial. Stay tuned for more tutorials and scenarios. You can also subscribe to our YouTube page at https://www.youtube.com/user/qnapsys
ㄑ
留言列表