You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered an issue with the wav_dataset.py in the audio-data-pytorch/audio_data_pytorch/datasets repository when using torchaudio version 2.1.1. The torchaudio.load function has changed its parameters, affecting lines 60 and 103 of the wav_dataset.py file.
Issue Description
In torchaudio 2.1.1, the torchaudio.load function no longer uses the filepath argument. Instead, it has been replaced with uri. This change causes errors in the following lines of the wav_dataset.py script:
Line 60:
Original Code:
waveform, sample_rate = torchaudio.load(filepath=self.wavs[idx], frame_offset=frame_offset, num_frames=crop_size)
Suggested Fix:
To maintain compatibility with torchaudio version 2.1.1, I suggest updating these lines to use the uri parameter instead of filepath or removing the filepath keyword and passing the path directly as the first argument . This change should resolve the compatibility issue and ensure the script functions correctly with the latest version of torchaudio.
Thank you for your attention to this matter. I look forward to the update or any alternative solutions you might suggest.
Best regards,
Michele Mancusi
The text was updated successfully, but these errors were encountered:
Hello,
I've encountered an issue with the
wav_dataset.py
in theaudio-data-pytorch/audio_data_pytorch/datasets
repository when using torchaudio version 2.1.1. Thetorchaudio.load
function has changed its parameters, affecting lines 60 and 103 of thewav_dataset.py
file.Issue Description
In torchaudio 2.1.1, the
torchaudio.load
function no longer uses thefilepath
argument. Instead, it has been replaced withuri
. This change causes errors in the following lines of thewav_dataset.py
script:Line 60:
Original Code:
waveform, sample_rate = torchaudio.load(filepath=self.wavs[idx], frame_offset=frame_offset, num_frames=crop_size)
Proposed Change:
waveform, sample_rate = torchaudio.load(uri=self.wavs[idx], frame_offset=frame_offset, num_frames=crop_size)
Line 103:
Original Code:
waveform, sample_rate = torchaudio.load(filepath=self.wavs[idx])
Proposed Change:
waveform, sample_rate = torchaudio.load(uri=self.wavs[idx])
Suggested Fix:
To maintain compatibility with torchaudio version 2.1.1, I suggest updating these lines to use the uri parameter instead of filepath or removing the
filepath
keyword and passing the path directly as the first argument . This change should resolve the compatibility issue and ensure the script functions correctly with the latest version of torchaudio.Thank you for your attention to this matter. I look forward to the update or any alternative solutions you might suggest.
Best regards,
Michele Mancusi
The text was updated successfully, but these errors were encountered: