Audio batch loading
Currently, the AudioFrameLoader provides the option to specify a batch_size
. However, the behaviour is perhaps a bit counterintuitive. The loader does load several waveform segments in one go (and converts them to spectrograms in one go too), which tends to be computationally more efficient than loading and converting them one at the time, but it only returns one segment at a time (the loaded batch is kept in a class attribute). Would it be more useful and intuitive to have it return the entire batch at every call to next()
?
@bpadovese , your thoughts?
Also, from the point of code structure, I think the code could be improved by creating another class called AudioSingleFramerLoader
and have the AudioFrameLoader
delegate work to this helper class.