Torchaudio: how to frame and append long wav file?

torchaudio: how to frame and append long wav files using different durations?

e.g., I have 40G of 100,000 wav files (5 labels) with different length.

  1. I wish to do 2, 3 and 4 durations of frames among these labels. Append the frames (I do not want miss the file)
  2. How to append them without save to my disk >> 100,000 files?

Hey, if by framing you mean slicing audio into series of optionally overlapping frames, see librosa.util.frame() or soundfile.blocks().

1 Like

Thanks @JamesWright. This sounds very clear to me now. I will try to use soundfile.blocks with torchaudio.