Music Classification sub dividing audio

I have been following this for my school project, but my dataset is not GTZAN, and it only have 200 audios, and I read from this tutorial that we can sub divide the audios from 30s to 15s segments, may I know how should I do that?
should I do it in the preprocess_function? or I shoud use librosa to resample the audios before loading them with load_dataset?

1 Like