From 7a56af435170c71b63617b52ace3919a8bf8415f Mon Sep 17 00:00:00 2001 From: Bailey Hirota Date: Fri, 11 Jul 2025 19:07:45 +0900 Subject: [PATCH] keep backward compatibility and add proper error handling for musan manifest loading --- egs/reazonspeech/ASR/local/utils/asr_datamodule.py | 2 +- egs/reazonspeech/ASR/zipformer/train.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/egs/reazonspeech/ASR/local/utils/asr_datamodule.py b/egs/reazonspeech/ASR/local/utils/asr_datamodule.py index 3bbd48a43..60e4147be 100644 --- a/egs/reazonspeech/ASR/local/utils/asr_datamodule.py +++ b/egs/reazonspeech/ASR/local/utils/asr_datamodule.py @@ -174,7 +174,7 @@ class ReazonSpeechAsrDataModule: group.add_argument( "--enable-musan", type=str2bool, - default=True, + default=False, help="When enabled, select noise from MUSAN and mix it" "with training dataset. ", ) diff --git a/egs/reazonspeech/ASR/zipformer/train.py b/egs/reazonspeech/ASR/zipformer/train.py index b4d641935..0bd2542fe 100755 --- a/egs/reazonspeech/ASR/zipformer/train.py +++ b/egs/reazonspeech/ASR/zipformer/train.py @@ -1221,9 +1221,12 @@ def run(rank, world_size, args): sampler_state_dict = None if args.enable_musan: - cuts_musan = load_manifest(Path(args.manifest_dir) / "musan_cuts.jsonl.gz") - else: - cuts_musan = None + musan_path = Path(args.manifest_dir) / "musan_cuts.jsonl.gz" + if musan_path.exists(): + cuts_musan = load_manifest(musan_path) + logging.info(f"Loaded MUSAN manifest from {musan_path}") + else: + cuts_musan = None train_dl = reazonspeech_corpus.train_dataloaders( train_cuts,