Wanyu Zeng(wz42)
IntroductionThe misson of this project is to implement the “Wake Word Detection” model on an Arduino Nano BLE 33 Sense board. After the model is deployed on the Arduino Nano BLE 33 Sense board, it can achieve voice recognition and it can emit different colors of lights according to different word inputs. The project follows the instruction of the book TinyML: Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers.
Process1. Model training
I train the model in Colab with Python and Tensorflow. I configure the training to allow different words detection, appropiate learning rate and trainig steps. The model will train for 15, 000 steps with a learning rateof 0.001, and then 3, 000 steps with a learning rate of 0.0001. The total number ofsteps will be 18, 000. Below are the configuration.
Freeze the graph because we need to unite the weights and biases into a single model file with a specific format, which we can use to run inference. I create a static representation of the graph with the weights frozen into it.
Firstly I convert the model to TensorFlow Lite with a single command, an the next step is to get this model into a form that we can deploy to microcontrollers. Modify the code in Arduino editor to create a C array and change the detection word. The following files need to be modified.
arduino_command_responder.cpp file
micro_features_model.cpp
micro_features_micro_model_settings.cpp
3.Test result
Connect the Arduino Nano BLE 33 Sense board with the computer. Open Arduino editor and run the code. When say "on" to the board the LED light on the board should flash a green light and show the"on" word on the serial monitor
When say "off" to the board the LED light on the board should flash a red light and show the"off" word on the serial monitor
Comments
Please log in or sign up to comment.