Skip to content

Commit

Permalink
Fix - FLAC ERROR whilst decoding metadata (#1842)
Browse files Browse the repository at this point in the history
Check this [issue](pytorch/audio#2948)

I encounter this issue by using shard to do training on flacs files...
Notice the issue only occurs when using torchaudio to load a file-like object not a file path.
  • Loading branch information
Slyne authored May 25, 2023
1 parent a3318a7 commit 9ceb46d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wenet/dataset/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import torchaudio.compliance.kaldi as kaldi
from torch.nn.utils.rnn import pad_sequence

torchaudio.utils.sox_utils.set_buffer_size(16500)

AUDIO_FORMAT_SETS = set(['flac', 'mp3', 'm4a', 'ogg', 'opus', 'wav', 'wma'])


Expand Down

0 comments on commit 9ceb46d

Please sign in to comment.