Building the dataset for classifying music genres
Having been able to record audio with the Raspberry Pi Pico, we are now set to build the dataset for classifying music genres.
This recipe will walk you through collecting training samples from two sources: audio clips from the GTZAN dataset and audio recordings captured with the Raspberry Pi Pico. The collected audio clips will then be uploaded to Google Drive, ensuring easy access from Google Colab during the ML model preparation phase.
Getting ready
The dataset we need for training our model requires a substantial number of training samples for each music genre. Typically, a minimum of 100 samples per genre is recommended to yield better accuracy results.
However, the number of training samples is not the only factor to consider. In fact, the dataset must encompass a broad spectrum of songs, capturing the diverse stylistic variations within each genre.
As you might guess, collecting such a vast number of audio...