Audio sampling with ADC and timer interrupts on the Raspberry Pi Pico
All the components are now mounted on the breadboard. Therefore, there is nothing left for us to write our KWS application.
The application consists of recording 1-s audio and running the ML inference when pressing the push-button. The classification result will be shown through the RGB LEDs, similar to what we have done in the Continuous inferencing on the Arduino Nano recipe.
The following Arduino sketch and Python script contains the code referred to in this recipe:
09_kws_raspberrypi_pico.ino
:
09_debugging.py
:
https://github.com/PacktPublishing/TinyML-Cookbook/blob/main/Chapter04/PythonScripts/09_debugging.py
Getting ready
The application on the Raspberry Pi Pico will be based on the Edge Impulse nano_ble33_sense_microphone.cpp
example, where the user speaks...