Summary
In the first part of this chapter, we walked through the steps of recording audio clips using an external microphone with the Raspberry Pi Pico and analyzed the compute build blocks of the MFCCs feature extraction algorithm.
Our practical journey started by learning to connect the microphone to the Raspberry Pi Pico and record audio clips using the ADC peripheral and timer interrupts.
Then, we crafted a Python script to create audio files from the samples transmitted by the microcontroller over the serial connection. This script was then extended to upload the audio files to Google Drive, laying the foundation for building the training dataset. Given the large number of samples required for training the ML model, we collected the training data from the GTZAN dataset and audio recordings captured with the Raspberry Pi Pico. After the dataset preparation, we finally analyzed and implemented the MFCCs feature extraction using TensorFlow.
In the upcoming second part...