-
1AMB21 / AMB22 Wiring Diagram
Connect the microphone and LEDs to the AMB21/22 board following the diagram.
-
2AMB23 Wiring Diagram:
As AMB23 has a built-in microphone on the board, there is no need for any external microphone. For the LEDs, we will only connect two LEDs and then use the two onboard LEDs (Blue and Green).
-
3Firmware & Libraries Preparation
- Download the Ameba customized version of TensorFlow Lite for Microcontrollers library at https://github.com/ambiot/ambd_arduino/tree/master/Arduino_zip_libraries.
- Follow the instructions at https://www.arduino.cc/en/guide/libraries to install it.
- Ensure that the patch files found at https://github.com/ambiot/ambd_arduino/tree/master/Ameba_misc/ are also installed.
-
4Compile and Upload Code
Open the example, “Files” -> “Examples” -> “TensorFlowLite_Ameba” -> “micro_speech”.
Upload the code and press the reset button on Ameba once the upload is finished.
-
5Results
Once it is running, you should see one of the LEDs flashing, indicating that it is processing audio. Saying the word “yes” will cause the green LED to light up. Saying the word “no” will cause the red LED to light up. If the word is not recognized, the blue LED will light up.
The inference results are also output to the Arduino serial monitor, which appear as follows:
If you are having trouble getting the words recognized, here are some tips:
– Ensure that your surroundings are quiet with minimal noise.
– Experiment with varying the distance of the microphone, starting with it at an arm’s length.
– Experiment with different tones and volumes when saying the words.
– Depending on how you pronounce the words, the characteristics of the microphone used, getting one keyword recognized may be easier than the other. -
6Code Reference
More information on TensorFlow Lite for Microcontrollers can be found at: https://www.tensorflow.org/lite/microcontrollers
-
7More References
Please visit the following websites for more details about the board & other examples:
- AmebaIoT Official Website: https://www.amebaiot.com/en/
- AmebaIoT Official FB Page: https://www.facebook.com/groups/AmebaIoT
- AmebaIoT Forum: https://forum.amebaiot.com/
-
8Demo Video
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.