From 9d570870cff167b8b963ed1f73dae0d685ec53cf Mon Sep 17 00:00:00 2001 From: zr_jin Date: Tue, 7 May 2024 21:37:55 +0800 Subject: [PATCH] Update asr_datamodule.py (#1619) --- egs/yesno/ASR/tdnn/asr_datamodule.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/egs/yesno/ASR/tdnn/asr_datamodule.py b/egs/yesno/ASR/tdnn/asr_datamodule.py index b9ce8fb4eb..99f2a6d08f 100644 --- a/egs/yesno/ASR/tdnn/asr_datamodule.py +++ b/egs/yesno/ASR/tdnn/asr_datamodule.py @@ -181,7 +181,7 @@ def train_dataloaders(self) -> DataLoader: train = K2SpeechRecognitionDataset( cut_transforms=transforms, input_strategy=OnTheFlyFeatures( - FbankConfig(sampling_rate=8000, num_mel_bins=23) + Fbank(FbankConfig(sampling_rate=8000, num_mel_bins=23)) ), return_cuts=self.args.return_cuts, ) @@ -222,9 +222,11 @@ def test_dataloaders(self) -> DataLoader: logging.debug("About to create test dataset") test = K2SpeechRecognitionDataset( - input_strategy=OnTheFlyFeatures(Fbank(FbankConfig(num_mel_bins=23))) - if self.args.on_the_fly_feats - else PrecomputedFeatures(), + input_strategy=( + OnTheFlyFeatures(Fbank(FbankConfig(num_mel_bins=23))) + if self.args.on_the_fly_feats + else PrecomputedFeatures() + ), return_cuts=self.args.return_cuts, ) sampler = DynamicBucketingSampler(