Yunfei Xie(yx55)
IntroductionThis project is to realize the “Wake Word Detection” on an Arduino Nano BLE 33 Sense board. The board will be able to recognize voice and take action for different voice inputs. The voice recognition model was trained with TensorFlow and then deployed onto the Arduino board. In the end, the device can take voice inputs and flash lights for different recognized inputs. This project follows the instructions from Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers by Pete Warden and Daniel Situnayake. More details are in the following sections.
Model TrainingThe first step of this project is to train a model to recognize the voices. This requires the knowledge of machine learning and by the instructions from the book, I used Python, TensorFlow and Google Colab for the coding process.
The training process could be summarized into different stages:
1. Obtain the targeted dataset
2. Train the deep learning model
3. Evaluate the model’s performance
4. Convert the model so that it can be deployed onto the board
5. Prepare for on-device inference
6. Build the code to binary
7. Deploy the binary code onto the Arduino board
While training the model, I tested with the default words combination “on-off”. The whole training process took approximately one hours plus.
The float model accuracy and quantized model accuracy were around 89%, the accuracy could be improved but I think it is enough for now.
DeploymentThe model will be deployed onto the board of Arduino Nano 33 BLE Sense. I modified the code files “Micro_features_model.cpp”, “arduino_command_responder.cpp” and “micro_features_micro_model_settings.cpp” and then I was able to successfully deploy the model onto the board and tried some tests. Finally, the device was able to recognize “on” and “off” by having different reactions with lights.
Result








Comments