From 9ceb46deb172302b12541bcf38e4877c00cd162f Mon Sep 17 00:00:00 2001 From: Slyne Deng Date: Wed, 24 May 2023 23:34:15 -0700 Subject: [PATCH] Fix - FLAC ERROR whilst decoding metadata (#1842) Check this [issue](https://github.com/pytorch/audio/issues/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. --- wenet/dataset/processor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wenet/dataset/processor.py b/wenet/dataset/processor.py index 8042c4a65..b69ceca85 100644 --- a/wenet/dataset/processor.py +++ b/wenet/dataset/processor.py @@ -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'])