change for asr_datamodule.py

This commit is contained in:
luomingshuang 2022-03-07 16:32:52 +08:00
parent 93aaa14cda
commit b67c57de92

View File

@ -210,17 +210,17 @@ class TedLiumAsrDataModule:
logging.info( logging.info(
f"Time warp factor: {self.args.spec_aug_time_warp_factor}" f"Time warp factor: {self.args.spec_aug_time_warp_factor}"
) )
# Judge num_frame_masks according to Lhotse's version # Design the value of num_frame_masks according to Lhotse's version.
num_frame_masks = ( # In different Lhotse's versions, the default of num_frame_masks is
2 # different.
if ( num_frame_masks = 10
inspect.signature(SpecAugment.__init__) num_frame_masks_parameter = inspect.signature(
.parameters["num_frame_masks"] SpecAugment.__init__
.default ).parameters["num_frame_masks"]
== 1 if num_frame_masks_parameter.default == 1:
) num_frame_masks = 2
else 10 else:
) num_frame_masks = 10
logging.info(f"Num frame mask: {num_frame_masks}") logging.info(f"Num frame mask: {num_frame_masks}")
input_transforms.append( input_transforms.append(
SpecAugment( SpecAugment(