Skip to content

Commit

Permalink
'update'
Browse files Browse the repository at this point in the history
  • Loading branch information
goddamnVincent committed Nov 27, 2024
1 parent cbe012d commit 51efa14
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/icefall.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions egs/multi_zh-hans/ASR/local/compute_fbank_kespeech_dev_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
18 changes: 18 additions & 0 deletions egs/multi_zh-hans/ASR/local/compute_fbank_kespeech_splits.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 51efa14

Please sign in to comment.