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 eee1565b6..15e53574e 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 0e17a6c10..9c5bd69a6 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 @@ -835,7 +835,7 @@ def compute_loss( #texts = batch["supervisions"]["text"] texts = [] - for utt_id in + for utt_id in token_ids = sp.encode(texts, out_type=int) y = k2.RaggedTensor(token_ids).to(device) @@ -1595,6 +1595,7 @@ def run_adapter(rank, world_size, args, wb=None): pl[text[0]] = ' '.join(text[1:]) pl_texts = pl + def remove_short_and_long_utt(c: Cut): return 1.0 <= c.duration <= 20.0