diff --git a/wenet/dataset/processor.py b/wenet/dataset/processor.py index 656e9ef8a..a0dea7973 100644 --- a/wenet/dataset/processor.py +++ b/wenet/dataset/processor.py @@ -108,9 +108,9 @@ def decode_wav(sample): with io.BytesIO(wav_file) as file_obj: waveform, sample_rate = torchaudio.load(file_obj) # del wav_file - del sample['wav'] - sample['wav'] = waveform # overwrite wav - sample['sample_rate'] = sample_rate + del sample['wav'] + sample['wav'] = waveform # overwrite wav + sample['sample_rate'] = sample_rate return sample