It recognizes voice command by comparing recorded data to streaming sound. So it needs to be trained at first, to memorize the keyword.
The training process is quite simple. When it receives message like “sigtrain 0 0”, then it starts to remember sound coming in to the microphone.
What I wanna do is, connect a simple tact button to the arduino and switch in to the “training mode” by pushing the button, which is the same function as I enter “sigtrain …” in the serial monitor, as same as I mentioned above.
I thought it could be able by using ‘Serial.write()’, but it didn’t worked. And I couldn’t find the way out of this problem.
Is there someone who tried things like this? Or someone who knows how to approach this issue?
vr_sample_train.ino (27.2 KB)