From bb79746dcb5d8385f8e739a22513b05c1eb8bb7d Mon Sep 17 00:00:00 2001 From: dohe0342 Date: Thu, 26 Jan 2023 14:40:35 +0900 Subject: [PATCH] from local --- .../.train_adapter.py.swp | Bin 90112 -> 90112 bytes .../train_adapter.py | 15 ++++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.train_adapter.py.swp b/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.train_adapter.py.swp index 4cc2ae853c44eeee9abc6128fa47ea2543a545d9..eee1565b6b95a9a793ce5b9e9624adbb059a3e65 100644 GIT binary patch delta 224 zcmZoTz}j$tRW!*U%+puFQqO<^2m}}yf`l$5Z`vq&i5LzX!^k2I56Pyby@XfY=v^eSnw`h(S7E08RL?IoBbZ zXY$`z9u@^4n0&)Wh84sBv1TwbOz!qIoP5AnVe%7SDUO011zUycT87EGlQbr4`x!Rp M`EAehW1J)i0FrMkI{*Lx diff --git a/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/train_adapter.py b/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/train_adapter.py index 8be8b63a0..0e17a6c10 100755 --- a/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/train_adapter.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/train_adapter.py @@ -1587,13 +1587,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:]) - + + with open('/workspace/icefall/egs/librispeech/ASR/tc_big.pl', 'r').readlines() as pl_texts: + pl = {} + for text in pl_texts: + text = text.strip().split() + pl[text[0]] = ' '.join(text[1:]) + + pl_texts = pl def remove_short_and_long_utt(c: Cut): return 1.0 <= c.duration <= 20.0