I am trying to create a data loader for audio dataset. I have a bunch of audio files and those are listed in a csv file. To create a data loader, I need to inherit Dataset class and implement getitem and len methods. I want to load and process audio data on the fly and additionally my DNN model is not sequence wise. I need to load a set of audio files pre-process it and divide it into frames of constant size. At the time of input(to DNN) I need to take a minibatch of audio frames(not whole audio sequence).
getitem method takes an index and return the data frame corresponding to the index. All my audio file paths are in a CSV file and I want the Dataset loader to input it and load, pre-process and divide it into frames on the fly.
What do i do to make ‘index’ variable of getitem correspond to audio data frames ?