add two pass decoding

This commit is contained in:
marcoyang1998 2023-08-16 16:46:50 +08:00
parent 0982db9cde
commit 2091bb5f25
2 changed files with 1001 additions and 8 deletions

View File

@ -419,14 +419,6 @@ def decode_one_batch(
if params.use_ls_context_list and params.use_ls_test_set:
#fixed_sentence = "Mixed-case English transcription, with punctuation. Actually, it is fully not related."
pre_texts = [biasing_dict[id] for id in cut_ids]
#pre_texts = batch["supervisions"]["text"]
#pre_texts = [get_substring(s, min_len=20, max_len=25) for s in pre_texts]
# pre_texts = []
# import random
# for i, s in enumerate(batch["supervisions"]["text"]):
# s = s.split()
# random.shuffle(s)
# pre_texts.append(" ".join(s))
if params.use_style_prompt:
style_texts = batch["supervisions"]["style_text"]

File diff suppressed because it is too large Load Diff