from local

This commit is contained in:
dohe0342 2023-01-26 14:19:49 +09:00
parent 77d7890b75
commit a0fb9639b0
2 changed files with 9 additions and 0 deletions

View File

@ -834,6 +834,7 @@ def compute_loss(
texts = batch["supervisions"]["text"]
print(texts)
#texts = batch["greedy pseudo text"]
token_ids = sp.encode(texts, out_type=int)
y = k2.RaggedTensor(token_ids).to(device)
@ -1582,6 +1583,14 @@ def run_adapter(rank, world_size, args, wb=None):
#train_cuts = librispeech.train_clean_10_cuts(option='male')
train_cuts = librispeech.test_clean_user(option='big')
pl_texts = open('/workspace/icefall/egs/librispeech/ASR/tc_big.pl', 'r').readlines()
pl = {}
for text in pl_texts:
text = text.strip().split()
pl[text[0]] = ' '.join(text[1:])
print(pl)
exit()
def remove_short_and_long_utt(c: Cut):
return 1.0 <= c.duration <= 20.0