From eedd204a5b8fcbeae05e2e816fb9f69b977f1839 Mon Sep 17 00:00:00 2001 From: zr_jin Date: Sat, 2 Sep 2023 16:59:12 +0800 Subject: [PATCH 1/6] Update egs/multi_zh-hans/ASR/local/compute_fbank_magicdata.py Co-authored-by: Fangjun Kuang --- egs/multi_zh-hans/ASR/local/compute_fbank_magicdata.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/egs/multi_zh-hans/ASR/local/compute_fbank_magicdata.py b/egs/multi_zh-hans/ASR/local/compute_fbank_magicdata.py index 1ddd72377..95f140173 100755 --- a/egs/multi_zh-hans/ASR/local/compute_fbank_magicdata.py +++ b/egs/multi_zh-hans/ASR/local/compute_fbank_magicdata.py @@ -78,11 +78,9 @@ def compute_fbank_thchs30(num_mel_bins: int = 80, speed_perturb: bool = False): recordings=m["recordings"], supervisions=m["supervisions"], ) - if "train" in partition: + if "train" in partition and speed_perturb: cut_set = ( (cut_set + cut_set.perturb_speed(0.9) + cut_set.perturb_speed(1.1)) - if speed_perturb - else cut_set ) cut_set = cut_set.compute_and_store_features( extractor=extractor, From f2ead129ef6958fe879e66da00b9ee7d8aa15e62 Mon Sep 17 00:00:00 2001 From: zr_jin Date: Sat, 2 Sep 2023 16:59:31 +0800 Subject: [PATCH 2/6] Update egs/multi_zh-hans/ASR/local/compute_fbank_magicdata.py Co-authored-by: Fangjun Kuang --- egs/multi_zh-hans/ASR/local/compute_fbank_magicdata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/egs/multi_zh-hans/ASR/local/compute_fbank_magicdata.py b/egs/multi_zh-hans/ASR/local/compute_fbank_magicdata.py index 95f140173..a0ea24d57 100755 --- a/egs/multi_zh-hans/ASR/local/compute_fbank_magicdata.py +++ b/egs/multi_zh-hans/ASR/local/compute_fbank_magicdata.py @@ -43,7 +43,7 @@ torch.set_num_threads(1) torch.set_num_interop_threads(1) -def compute_fbank_thchs30(num_mel_bins: int = 80, speed_perturb: bool = False): +def compute_fbank_magicdata(num_mel_bins: int = 80, speed_perturb: bool = False): src_dir = Path("data/manifests/magicdata") output_dir = Path("data/fbank") num_jobs = min(30, os.cpu_count()) From 677842361f3bd2249a96be54990d80d4d07c296c Mon Sep 17 00:00:00 2001 From: zr_jin Date: Sat, 2 Sep 2023 16:59:44 +0800 Subject: [PATCH 3/6] Update egs/multi_zh-hans/ASR/local/compute_fbank_stcmds.py Co-authored-by: Fangjun Kuang --- egs/multi_zh-hans/ASR/local/compute_fbank_stcmds.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/egs/multi_zh-hans/ASR/local/compute_fbank_stcmds.py b/egs/multi_zh-hans/ASR/local/compute_fbank_stcmds.py index b5deddeab..dc37453c3 100755 --- a/egs/multi_zh-hans/ASR/local/compute_fbank_stcmds.py +++ b/egs/multi_zh-hans/ASR/local/compute_fbank_stcmds.py @@ -78,11 +78,9 @@ def compute_fbank_thchs30(num_mel_bins: int = 80, speed_perturb: bool = False): recordings=m["recordings"], supervisions=m["supervisions"], ) - if "train" in partition: + if "train" in partition and speed_perturb: cut_set = ( (cut_set + cut_set.perturb_speed(0.9) + cut_set.perturb_speed(1.1)) - if speed_perturb - else cut_set ) cut_set = cut_set.compute_and_store_features( extractor=extractor, From d577b89400273c06af4ef1ac29aedda33cdd1718 Mon Sep 17 00:00:00 2001 From: zr_jin Date: Sat, 2 Sep 2023 16:59:56 +0800 Subject: [PATCH 4/6] Update egs/multi_zh-hans/ASR/local/compute_fbank_stcmds.py Co-authored-by: Fangjun Kuang --- egs/multi_zh-hans/ASR/local/compute_fbank_stcmds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/egs/multi_zh-hans/ASR/local/compute_fbank_stcmds.py b/egs/multi_zh-hans/ASR/local/compute_fbank_stcmds.py index dc37453c3..34442e787 100755 --- a/egs/multi_zh-hans/ASR/local/compute_fbank_stcmds.py +++ b/egs/multi_zh-hans/ASR/local/compute_fbank_stcmds.py @@ -43,7 +43,7 @@ torch.set_num_threads(1) torch.set_num_interop_threads(1) -def compute_fbank_thchs30(num_mel_bins: int = 80, speed_perturb: bool = False): +def compute_fbank_stcmds(num_mel_bins: int = 80, speed_perturb: bool = False): src_dir = Path("data/manifests/stcmds") output_dir = Path("data/fbank") num_jobs = min(15, os.cpu_count()) From b656a444f47e3a031f6c00179545a9cd20ca33ea Mon Sep 17 00:00:00 2001 From: zr_jin Date: Sat, 2 Sep 2023 17:00:06 +0800 Subject: [PATCH 5/6] Update egs/multi_zh-hans/ASR/local/compute_fbank_primewords.py Co-authored-by: Fangjun Kuang --- egs/multi_zh-hans/ASR/local/compute_fbank_primewords.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/egs/multi_zh-hans/ASR/local/compute_fbank_primewords.py b/egs/multi_zh-hans/ASR/local/compute_fbank_primewords.py index d332e0067..3733b6af4 100755 --- a/egs/multi_zh-hans/ASR/local/compute_fbank_primewords.py +++ b/egs/multi_zh-hans/ASR/local/compute_fbank_primewords.py @@ -78,11 +78,9 @@ def compute_fbank_thchs30(num_mel_bins: int = 80, speed_perturb: bool = False): recordings=m["recordings"], supervisions=m["supervisions"], ) - if "train" in partition: + if "train" in partition and speed_perturb: cut_set = ( (cut_set + cut_set.perturb_speed(0.9) + cut_set.perturb_speed(1.1)) - if speed_perturb - else cut_set ) cut_set = cut_set.compute_and_store_features( extractor=extractor, From 4ab5ab92b49860d5c0a38387806ce6358e5543bf Mon Sep 17 00:00:00 2001 From: zr_jin Date: Sat, 2 Sep 2023 17:00:17 +0800 Subject: [PATCH 6/6] Update egs/multi_zh-hans/ASR/local/compute_fbank_primewords.py Co-authored-by: Fangjun Kuang --- egs/multi_zh-hans/ASR/local/compute_fbank_primewords.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/egs/multi_zh-hans/ASR/local/compute_fbank_primewords.py b/egs/multi_zh-hans/ASR/local/compute_fbank_primewords.py index 3733b6af4..32dd1d81a 100755 --- a/egs/multi_zh-hans/ASR/local/compute_fbank_primewords.py +++ b/egs/multi_zh-hans/ASR/local/compute_fbank_primewords.py @@ -43,7 +43,7 @@ torch.set_num_threads(1) torch.set_num_interop_threads(1) -def compute_fbank_thchs30(num_mel_bins: int = 80, speed_perturb: bool = False): +def compute_fbank_primewords(num_mel_bins: int = 80, speed_perturb: bool = False): src_dir = Path("data/manifests/primewords") output_dir = Path("data/fbank") num_jobs = min(15, os.cpu_count())