diff --git a/egs/reazonspeech/ASR/local/compute_fbank_musan.py b/egs/reazonspeech/ASR/local/compute_fbank_musan.py index 72c61f326..ac9d80720 100755 --- a/egs/reazonspeech/ASR/local/compute_fbank_musan.py +++ b/egs/reazonspeech/ASR/local/compute_fbank_musan.py @@ -55,7 +55,9 @@ def is_cut_long(c: MonoCut) -> bool: def compute_fbank_musan( - num_mel_bins: int = 80, whisper_fbank: bool = False, output_dir: str = "data/manifests" + num_mel_bins: int = 80, + whisper_fbank: bool = False, + output_dir: str = "data/manifests", ): src_dir = Path("data/manifests") output_dir = Path(output_dir) diff --git a/egs/reazonspeech/ASR/local/utils/asr_datamodule.py b/egs/reazonspeech/ASR/local/utils/asr_datamodule.py index 60e4147be..bbede6c38 100644 --- a/egs/reazonspeech/ASR/local/utils/asr_datamodule.py +++ b/egs/reazonspeech/ASR/local/utils/asr_datamodule.py @@ -180,8 +180,8 @@ class ReazonSpeechAsrDataModule: ) def train_dataloaders( - self, - cuts_train: CutSet, + self, + cuts_train: CutSet, sampler_state_dict: Optional[Dict[str, Any]] = None, cuts_musan: Optional[CutSet] = None, ) -> DataLoader: diff --git a/egs/reazonspeech/ASR/zipformer/train.py b/egs/reazonspeech/ASR/zipformer/train.py index ca7691406..6e63cfd44 100755 --- a/egs/reazonspeech/ASR/zipformer/train.py +++ b/egs/reazonspeech/ASR/zipformer/train.py @@ -65,10 +65,10 @@ import torch.nn as nn from asr_datamodule import ReazonSpeechAsrDataModule from decoder import Decoder from joiner import Joiner +from lhotse import load_manifest from lhotse.cut import Cut from lhotse.dataset.sampling.base import CutSampler from lhotse.utils import fix_random_seed -from lhotse import load_manifest from model import AsrModel from optim import Eden, ScaledAdam from scaling import ScheduledFloat @@ -1226,14 +1226,16 @@ def run(rank, world_size, args): cuts_musan = load_manifest(musan_path) logging.info(f"Loaded MUSAN manifest from {musan_path}") else: - logging.warning(f"MUSAN manifest not found at {musan_path}, disabling MUSAN augmentation") + logging.warning( + f"MUSAN manifest not found at {musan_path}, disabling MUSAN augmentation" + ) cuts_musan = None else: cuts_musan = None train_dl = reazonspeech_corpus.train_dataloaders( - train_cuts, - sampler_state_dict=sampler_state_dict, + train_cuts, + sampler_state_dict=sampler_state_dict, cuts_musan=cuts_musan, )