Recognizing music genres with the Raspberry Pi Pico
Here we are, ready to finalize our application on the Raspberry Pi Pico.
In this final recipe, we will deploy the TensorFlow Lite model to recognize the music genre from audio clips recorded with the microphone connected to the microcontroller.
Getting ready
The application we will design in this recipe aims to continuously record a 1-second audio clip and run the model inference, as illustrated in the following image:
Figure 6.17: Recording and processing tasks running sequentially
From the task execution timeline shown in the preceding image, you can observe that the feature extraction and model inference are always performed after the audio recording and not concurrently. Therefore, it is evident that we do not process some segments of the live audio stream.
Unlike a real-time keyword spotting (KWS) application, which should capture and process all pieces of the audio stream to never miss any spoken...