diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000000..26d33521af
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/icefall.iml b/.idea/icefall.iml
new file mode 100644
index 0000000000..5fdd65ba2a
--- /dev/null
+++ b/.idea/icefall.iml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000000..cd83845641
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000000..105ce2da2d
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000000..b33405972e
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000000..35eb1ddfbb
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egs/multi_zh-hans/ASR/local/compute_fbank_kespeech_dev_test.py b/egs/multi_zh-hans/ASR/local/compute_fbank_kespeech_dev_test.py
index 6f75dbfa49..52be850729 100755
--- a/egs/multi_zh-hans/ASR/local/compute_fbank_kespeech_dev_test.py
+++ b/egs/multi_zh-hans/ASR/local/compute_fbank_kespeech_dev_test.py
@@ -52,7 +52,13 @@ def get_parser():
default=80,
help="""The number of mel bins for Fbank""",
)
-
+ # 修改: 添加 指定参数 speed-perturb
+ parser.add_argument(
+ "--speed-perturb",
+ type=bool,
+ default=False,
+ help="Enable 0.9 and 1.1 speed perturbation for data augmentation. Default: False.",
+ )
parser.add_argument(
"--whisper-fbank",
type=str2bool,
@@ -103,7 +109,11 @@ def compute_fbank_kespeech_dev_test(args):
cut_set = cut_set.trim_to_supervisions(
keep_overlapping=False, min_duration=None
)
-
+ # 修改 执行 perturb操作
+ if speed_perturb:
+ cut_set = (
+ cut_set + cut_set.perturb_speed(0.9) + cut_set.perturb_speed(1.1)
+ )
logging.info("Computing features")
cut_set = cut_set.compute_and_store_features_batch(
extractor=extractor,
diff --git a/egs/multi_zh-hans/ASR/local/compute_fbank_kespeech_splits.py b/egs/multi_zh-hans/ASR/local/compute_fbank_kespeech_splits.py
index c398411f6e..1bbe68de70 100755
--- a/egs/multi_zh-hans/ASR/local/compute_fbank_kespeech_splits.py
+++ b/egs/multi_zh-hans/ASR/local/compute_fbank_kespeech_splits.py
@@ -100,6 +100,19 @@ def get_parser():
help="""The number of mel bins for Fbank""",
)
+ parser.add_argument(
+ "--whisper-fbank",
+ type=str2bool,
+ default=False,
+ help="Use WhisperFbank instead of Fbank. Default: False.",
+ )
+ #修改: 添加 指定参数 speed-perturb
+ parser.add_argument(
+ "--speed-perturb",
+ type=bool,
+ default=False,
+ help="Enable 0.9 and 1.1 speed perturbation for data augmentation. Default: False.",
+ )
parser.add_argument(
"--whisper-fbank",
type=str2bool,
@@ -157,6 +170,11 @@ def compute_fbank_kespeech_splits(args):
cut_set = cut_set.trim_to_supervisions(
keep_overlapping=False, min_duration=None
)
+ # 修改 执行 perturb操作
+ if speed_perturb:
+ cut_set = (
+ cut_set + cut_set.perturb_speed(0.9) + cut_set.perturb_speed(1.1)
+ )
logging.info("Computing features")
cut_set = cut_set.compute_and_store_features_batch(