Skip to content

Commit

Permalink
Update asr_datamodule.py (k2-fsa#1619)
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZr authored and Your Name committed Aug 9, 2024
1 parent 8041ae7 commit 09e463b
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 09e463b

Please sign in to comment.