In this article we use Google Colaboratory to train micro_speech model.
1. Open note book and change WANTED_WORDS
I choose ON/OFF for my project.
# A comma-delimited list of the words you want to train for.
# The options are: yes,no,up,down,left,right,on,off,stop,go
# All the other words will be used to train an "unknown" label and silent
# audio data with no spoken words will be used to train a "silence" label.
WANTED_WORDS = "on,off"
2. Follow instruction and you can see training progress(Model accuracy for training set and validation set) in tensorboard section.
3. Convert to TF-lite model and test TensorFlow Lite model's accuracy
5. Modify micro_speech/micro_features/micro_model_settings.cc kCategoryLabels to on/off
6. Replace micro_speech/micro_features/model.cc to new trained model.
7. Build and flash
8. Test result
I use K66F onboard mic to test and the accuracy is lower than I expect. But the trained model has 80% more accuracy, so maybe need to use line mic to get better accuracy speech recognize result.
沒有留言:
張貼留言