Skip to content

Commit

Permalink
Update asr_datamodule.py (#1619)
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZr authored May 7, 2024
1 parent 4e97b19 commit 9d57087
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions egs/yesno/ASR/tdnn/asr_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 9d57087

Please sign in to comment.