Skip to content

Commit

Permalink
update users/raissi
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin84 committed Dec 18, 2024
1 parent d9160f1 commit 75ee8ba
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 3 deletions.
56 changes: 56 additions & 0 deletions users/raissi/experiments/domain_mismtach/medline/base_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ class DATASET:
cached=True,
hash_overwrite="GLOWTTS_V1_DEV_MED_055",
)
wmt22_medline_noise0551 = tk.Path(
("/").join([PREPATH_CORPORA, "wmt22_medline_v1_sequiturg2p_glowtts460_noise055_seed1.xml.gz"]),
cached=True,
hash_overwrite="GLOWTTS_V1_DEV_MED_0551",
)
wmt22_medline_noise0552 = tk.Path(
("/").join([PREPATH_CORPORA, "wmt22_medline_v1_sequiturg2p_glowtts460_noise055_seed2.xml.gz"]),
cached=True,
hash_overwrite="GLOWTTS_V1_DEV_MED_0552",
)
wmt22_medline_noise03 = tk.Path(
("/").join([PREPATH_CORPORA, "wmt22_medline_v1_sequiturg2p_glowtts460_noise03.xml.gz"]),
cached=True,
Expand Down Expand Up @@ -119,6 +129,22 @@ class DATASET:
lm=tk.Path(f"{PREPATH_ASR3}/lm/v2/medline+LBS/ufal_v1_mixlex_v2.lm.gz", cached=True, hash_overwrite="v21_lm"),
description="lexicon uses both LBS and medline data with words repeating 3 or more",
),
0.55: DATASET(
lexicon_with_unk=tk.Path(
f"{PREPATH_ASR3}/lexicon/v2/medline+LBS/ufal_v1_mixlex_v2.rasr_with_unk.xml.gz",
cached=True,
hash_overwrite="v21_unk",
),
lexicon_no_unk=tk.Path(
f"{PREPATH_ASR3}/lexicon/v2/medline+LBS/ufal_v1_mixlex_v2.rasr_without_unk.xml.gz",
cached=True,
hash_overwrite="v21_nounk",
),
corpus=wmt22_medline_noise055,
lm=tk.Path(f"{PREPATH_ASR3}/lm/v2/medline+LBS/ufal_v1_mixlex_v2.lm.gz", cached=True, hash_overwrite="v21_lm"),
description="lexicon uses both LBS and medline data with words repeating 3 or more",
),

0.3: DATASET(
lexicon_with_unk=tk.Path(
f"{PREPATH_ASR3}/lexicon/v2/medline+LBS/ufal_v1_mixlex_v2.rasr_with_unk.xml.gz",
Expand Down Expand Up @@ -167,6 +193,36 @@ class DATASET:
lm=tk.Path(f"{PREPATH_ASR3}/lm/v2/only_medline/ufal_v1_lm_3more.gz", cached=True, hash_overwrite="v22_lm"),
description="lexicon uses only medline data with words repeating 3 or more",
),
0.551: DATASET(
lexicon_with_unk=tk.Path(
f"{PREPATH_ASR3}/lexicon/v2/only_medline/ufal_v1_3more_only.rasr_with_unk.xml.gz",
cached=True,
hash_overwrite="v22_unk",
),
lexicon_no_unk=tk.Path(
f"{PREPATH_ASR3}/lexicon/v2/only_medline/ufal_v1_3more_only.rasr_without_unk.xml.gz",
cached=True,
hash_overwrite="v22_nounk",
),
corpus=wmt22_medline_noise0551,
lm=tk.Path(f"{PREPATH_ASR3}/lm/v2/only_medline/ufal_v1_lm_3more.gz", cached=True, hash_overwrite="v22_lm"),
description="lexicon uses only medline data with words repeating 3 or more",
),
0.552: DATASET(
lexicon_with_unk=tk.Path(
f"{PREPATH_ASR3}/lexicon/v2/only_medline/ufal_v1_3more_only.rasr_with_unk.xml.gz",
cached=True,
hash_overwrite="v22_unk",
),
lexicon_no_unk=tk.Path(
f"{PREPATH_ASR3}/lexicon/v2/only_medline/ufal_v1_3more_only.rasr_without_unk.xml.gz",
cached=True,
hash_overwrite="v22_nounk",
),
corpus=wmt22_medline_noise0552,
lm=tk.Path(f"{PREPATH_ASR3}/lm/v2/only_medline/ufal_v1_lm_3more.gz", cached=True, hash_overwrite="v22_lm"),
description="lexicon uses only medline data with words repeating 3 or more",
),
0.3: DATASET(
lexicon_with_unk=tk.Path(
f"{PREPATH_ASR3}/lexicon/v2/only_medline/ufal_v1_3more_only.rasr_with_unk.xml.gz",
Expand Down
4 changes: 3 additions & 1 deletion users/raissi/experiments/tts_librispeech/base_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@
dev_other_noise07 = tk.Path(("/").join([prepath_data, "dev-other_sequiturg2p_glowtts460_noise07.xml.gz"]),cached=True, hash_overwrite="GLOWTTS_V1_DEV_07")
dev_other_noise03 = tk.Path(("/").join([prepath_data, "dev-other_sequiturg2p_glowtts460_noise03.xml.gz"]),cached=True, hash_overwrite="GLOWTTS_V1_DEV_03")
dev_other_noise055 = tk.Path(("/").join([prepath_data, "dev-other_sequiturg2p_glowtts460_noise055.xml.gz"]),cached=True, hash_overwrite="GLOWTTS_V1_DEV_055")
dev_other_noise0551 = tk.Path(("/").join([prepath_data, "dev-other_sequiturg2p_glowtts460_noise055_seed1.xml.gz"]),cached=True, hash_overwrite="GLOWTTS_V1_DEV_0551")
dev_other_noise0552 = tk.Path(("/").join([prepath_data, "dev-other_sequiturg2p_glowtts460_noise055_seed2.xml.gz"]),cached=True, hash_overwrite="GLOWTTS_V1_DEV_0552")

TTS_DEVOTHER = {
0.3: dev_other_noise03, 0.7: dev_other_noise07, 0.55: dev_other_noise055
0.3: dev_other_noise03, 0.7: dev_other_noise07, 0.55: dev_other_noise055, 0.551: dev_other_noise0551, 0.552: dev_other_noise0552,
}


Expand Down
9 changes: 9 additions & 0 deletions users/raissi/setups/common/TF_factored_hybrid_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,14 @@ def get_best_recog_scales_and_transition_values(
[v for v in np.arange(0.1, 0.6, 0.1).round(1)],
)
)
elif context_type == PhoneticContext.diphone:
prior_scales = list(
itertools.product(
[v for v in np.arange(0.1, 0.7, 0.1).round(1)],
[v for v in np.arange(0.1, 0.7, 0.1).round(1)],
)
)

else:
raise NotImplementedError("You were not supposed to run monophone decoding with factored decoder")
else:
Expand All @@ -1551,6 +1559,7 @@ def get_best_recog_scales_and_transition_values(
sil_tdp = (11.0, 0.0, "infinity", 20.0)
sp_tdp = (8.0, 0.0, "infinity", 0.0)


best_config_scales = recognizer.recognize_optimize_scales_v2(
label_info=self.label_info,
search_parameters=tune_args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@ def recognize(
)

lat2ctm_extra_config = rasr.RasrConfig()

lat2ctm_extra_config.flf_lattice_tool.network.to_lemma.links = "best"
lat2ctm = recog.LatticeToCtmJob(
crp=search_crp,
Expand Down
8 changes: 8 additions & 0 deletions users/raissi/setups/common/helpers/network/modify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import copy
from typing import Dict


def delete_right_context_branch(network: Dict):
for k in ["currentState", "linear1-triphone", "linear2-triphone", "right-output"]:
network.pop(k, None)
return network
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def get_kazuki_lstm_config(

#model and graph info
trafo_config.loader.type = "meta"
trafo_config.loader.meta_graph_file = tk.Path("/u/raissi/Desktop/debug/lstm_lm/mini.graph.meta", cached=True)
trafo_config.loader.saved_model_file = DelayedFormat("/work/asr4/rossenbach/custom_projects/kazuki_replicate_lm_training/net-model/network.029")
trafo_config.loader.meta_graph_file = tk.Path("/u/raissi/Desktop/debug/lstm_lm/mini2.3.graph.meta", cached=True)
trafo_config.loader.saved_model_file = DelayedFormat("//u/raissi/Desktop/debug/lstm_lm/models/net-model-mini2.2/network.030")
trafo_config.loader.required_libraries = self.library_path

trafo_config.type = "tfrnn"
Expand Down

0 comments on commit 75ee8ba

Please sign in to comment.