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 4cc2ae853..eee1565b6 100644 Binary files a/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.train_adapter.py.swp and b/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.train_adapter.py.swp differ 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