This is the code I've used in my Hackster.io project. The core principle is on Simone Salerno's blog article as well as his EloquentTinyML library.
- Use the same mic on Nano 33 BLE Sense for voice data collection/classfication
- Use standard Python and scikit-learn/Tensorflow 2 for neural network model training
- Very easy Tensorflow model deployment with one script and one model file
Requirements:
- Python 3 64-bit with Tensorflow 2, NumPy, matplotlib, scikit-learn and tinymlgen
- Install Arduino nRF528x Boards support and EloquentTinyML library in Arduino IDE