Created
September 22, 2023 16:18
-
-
Save JIElite/d92da86211ef1bd4782401aa3ac876a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __iter__(self) | |
# self.raw_list: record the absolute path for each wav file | |
for path in self.raw_list: | |
wav_tensor, sample_rate = torchaudio.load(path) | |
yield dict(wav=wav_tensor, sample_rate=sample_rate) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment