Deployment of Speaker Identification System onto ESP32-DevKitC Microcontroller Using Neural Network and TensorFlow Lite
摘要
Embedded development of speaker identification models is often driven by the demand of highly optimized biometric voice systems. Despite the recent advances in speaker identification systems, developing an embedded artificial intelligence application comes with performance and resource constraints, such as computational power and memory limitations. This study focuses on how a speaker identification neural network is designed to meet deployment criteria on a microcontroller and how the Tiny Machine Learning (TinyML) approach and TensorFlow framework are positioned to solve complex issues in neural network deployment. The performances of two lightweight models of multilayer perceptron (MLP) and convolutional neural network (CNN) are compared to select a superior neural network architecture for speaker identification system deployment on the microcontroller. A TensorFlow model is then created with the selected MLP architecture due to its good accuracy, smaller model size, and shorter training time. The model is further converted into a TensorFlow Lite model and optimized using full integer quantization with integer float fallback, resulting in a model with a high accuracy of 99.0%, a small file size of 22.98 kB, and a short inference time of 1.56 ms for every prediction cycle. The optimized model is deployed onto an ESP32-DevKitC microcontroller. It successfully predicts the identity of speakers based on utterances fed from the terminal, demonstrating the high accuracy of TinyML on embedded systems. The power consumption of the speaker identification system on the ESP32-DevKitC microcontroller was 48.80 mW at 10 MHz operating frequency. The battery life calculated with a single-cell lithium-ion battery rated at 1000 mAh is 75.82 h.