-
Notifications
You must be signed in to change notification settings - Fork 14
Tedlium Hybrid Baseline #151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
ce3fb26
5c8f69a
fc23342
2d2f39a
e38010d
ddf6155
780625c
f58e2ff
c71e88c
d6b8feb
ca73e1b
f5e2cfc
7d27d3a
a7d5792
2799615
fd1cd09
6be293d
4b5e42e
008d230
8c9a3d8
f6c514b
b7ed5fd
d4b5bad
93c563f
3b1aca1
d08d4de
a556253
fe0e8f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| from i6_core.features import filter_width_from_channels | ||
|
|
||
|
|
||
| def get_gammatone_feature_extraction_args(): | ||
| return { | ||
| "gt_options": { | ||
| "minfreq": 100, | ||
| "maxfreq": 7500, | ||
| "channels": 50, | ||
| "tempint_type": "hanning", | ||
| "tempint_shift": 0.01, | ||
| "tempint_length": 0.025, | ||
| "flush_before_gap": True, | ||
| "do_specint": False, | ||
| "specint_type": "hanning", | ||
| "specint_shift": 4, | ||
| "specint_length": 9, | ||
| "normalize": True, | ||
| "preemphasis": True, | ||
| "legacy_scaling": False, | ||
| "without_samples": False, | ||
| "samples_options": { | ||
| "audio_format": "wav", | ||
| "dc_detection": False, | ||
| }, | ||
| "normalization_options": {}, | ||
| } | ||
| } | ||
|
|
||
|
|
||
| def get_log_mel_feature_extraction_args(): | ||
|
|
||
| return { | ||
| "fb": { | ||
| "filterbank_options": { | ||
| "warping_function": "mel", | ||
| "filter_width": filter_width_from_channels(channels=80, warping_function="mel", f_max=8000), | ||
| "normalize": True, | ||
| "normalization_options": None, | ||
| "without_samples": False, | ||
| "samples_options": { | ||
| "audio_format": "wav", | ||
| "dc_detection": False, | ||
| }, | ||
| "fft_options": None, | ||
| "add_features_output": True, | ||
| "apply_log": True, | ||
| "add_epsilon": True, | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| import copy | ||
| from sisyphus import gs, tk | ||
|
|
||
| from i6_core.features import FilterbankJob | ||
|
|
||
| from i6_experiments.common.setups.rasr.util import RasrSteps | ||
| from i6_experiments.common.setups.rasr.hybrid_system import HybridSystem | ||
| from i6_experiments.common.baselines.tedlium2.default_tools import RETURNN_RC_ROOT, RASR_BINARY_PATH | ||
|
|
||
| from .data import get_corpus_data_inputs | ||
| from .baseline_args import get_log_mel_feature_extraction_args | ||
| from .nn_config.nn_args import get_nn_args | ||
|
|
||
|
|
||
| def run_gmm_system(): | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the FSA bug correction included? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure. Where / how would that be included? RASR version? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. now it should be |
||
| from i6_experiments.common.baselines.tedlium2.gmm.baseline_config import ( | ||
| run_tedlium2_common_baseline, | ||
| ) | ||
|
|
||
| system = run_tedlium2_common_baseline() | ||
| return system | ||
|
|
||
|
|
||
| def run_tedlium2_hybrid_baseline(): | ||
| gs.ALIAS_AND_OUTPUT_SUBDIR = "baselines/tedlium2/hybrid/baseline" | ||
|
|
||
| gmm_system = run_gmm_system() | ||
| rasr_init_args = copy.deepcopy(gmm_system.rasr_init_args) | ||
| rasr_init_args.feature_extraction_args = get_log_mel_feature_extraction_args() | ||
| ( | ||
| nn_train_data_inputs, | ||
| nn_cv_data_inputs, | ||
| nn_devtrain_data_inputs, | ||
| nn_dev_data_inputs, | ||
| nn_test_data_inputs, | ||
| ) = get_corpus_data_inputs( | ||
| gmm_system, | ||
| rasr_init_args.feature_extraction_args["fb"], | ||
| FilterbankJob, | ||
| alias_prefix="experiments/tedlium2/hybrid/wei_baseline", | ||
| ) | ||
| # image only, so just python3 | ||
| returnn_exe = tk.Path("/usr/bin/python3", hash_overwrite="GENERIC_RETURNN_LAUNCHER") | ||
| blas_lib = tk.Path("/lib/x86_64-linux-gnu/liblapack.so.3") | ||
| blas_lib.hash_overwrite = "TEDLIUM2_DEFAULT_RASR_BINARY_PATH" | ||
| steps = RasrSteps() | ||
| steps.add_step("extract", rasr_init_args.feature_extraction_args) | ||
| gmm_system.run(steps) | ||
| nn_args = get_nn_args(num_epochs=160) | ||
| nn_steps = RasrSteps() | ||
| nn_steps.add_step("nn", nn_args) | ||
|
|
||
| tedlium_nn_system = HybridSystem( | ||
| returnn_root=RETURNN_RC_ROOT, | ||
| returnn_python_exe=returnn_exe, | ||
| blas_lib=blas_lib, | ||
| rasr_arch="linux-x86_64-standard", | ||
| rasr_binary_path=RASR_BINARY_PATH, | ||
| ) | ||
| tedlium_nn_system.init_system( | ||
| rasr_init_args=rasr_init_args, | ||
| train_data=nn_train_data_inputs, | ||
| cv_data=nn_cv_data_inputs, | ||
| devtrain_data=nn_devtrain_data_inputs, | ||
| dev_data=nn_dev_data_inputs, | ||
| test_data=nn_test_data_inputs, | ||
| train_cv_pairing=[tuple(["train.train", "dev.cv"])], | ||
| ) | ||
| tedlium_nn_system.run(nn_steps) | ||
|
|
||
| gs.ALIAS_AND_OUTPUT_SUBDIR = "" | ||
Uh oh!
There was an error while loading. Please reload this page.