Skip to content

Commit

Permalink
Minor fix decode_wav (#2340)
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenaxie authored Feb 5, 2024
1 parent a6a7f30 commit 331c414
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wenet/dataset/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,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


Expand Down

0 comments on commit 331c414

Please sign in to comment.