From f1f66e40b159e2a00c12c2e8cd18d009cfca0d81 Mon Sep 17 00:00:00 2001 From: dohe0342 Date: Mon, 30 Jan 2023 16:57:08 +0900 Subject: [PATCH] from local --- .../.data2vec_audio.py.swp | Bin 40960 -> 40960 bytes .../.decode.py.swp | Bin 49152 -> 49152 bytes .../decode.py | 39 ------------------ 3 files changed, 39 deletions(-) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.data2vec_audio.py.swp b/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.data2vec_audio.py.swp index 7da9f0440544c6f5b793693da3493046174bb6e6..3c166a238665807f0f757f7027a0c7781e8c29e2 100644 GIT binary patch delta 33 ncmZoTz|?SnNi4}A%+puFQqO<^2m}}ybSkbVH#Kb(do>>bog@kp delta 33 ncmZoTz|?SnNi4}A%+puFQqO<^2m}}yK9^ok=BeE%_G&%=q4Ek_ diff --git a/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.decode.py.swp b/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.decode.py.swp index acea0e92993d64a3dc737b590d0b634dd209860d..5e8209ab9f7829cb801848ef1c9b0569ad87286d 100644 GIT binary patch delta 535 zcmX}mKS%;`6bJBknfb3HPs0f9bWEM1r9H^FrofgOjx>kD9P~g)%3B&*g!r`uH@USK zf>)E#8acE^U~RQZ&3%7Ae%`@{_kQp9-n*Y|`)u3Si)u=;uW1uU{fZEs%o9g>$jVEpBy!Ll4t(UMQ_tr=^&dm2Sc W$DOdhR;+*faILVd?KE2-zWxJe0-+87 delta 330 zcmWO1KS%;$0EY25B>!ZFM+Z(;I&?-MMYJ}Y5Y^Jwawj6*hY5$nch`_*9zkmb-_j6m zK{Oc$K@l}ag)I@Zxwcs}2ED@%p7jZWNDxH2X>G_1HSOm-wHXCkF#u`6R9d&xc}W3v zic^dRqrf{|&>5AeH2w2w?*}Ie;Iz6OT&88&Cg94(wHeq zQFYu#Q+NfHJJ7RIc-yY;Rh&l6w~V?J!r7^KqAF`!Mp+GZGwN@DRy~wH)XM6lT6}!{ E2iRLk#Q*>R diff --git a/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/decode.py b/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/decode.py index 62aef36dd..99323fe7f 100755 --- a/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/decode.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/decode.py @@ -798,44 +798,6 @@ def main(): test_sets = [f"test-clean_sampling"] test_dl = [test_clean_dl] - for test_set, test_dl in zip(test_sets, test_dl): - results_dict = decode_dataset( - dl=test_dl, - params=params, - model=model, - sp=sp, - word_table=word_table, - decoding_graph=decoding_graph, - ) - results = results_dict['greedy_search'] - #jsons = open(f"{params.manifest_dir}/userlibri/{test_set}/{option}.jsonl", 'r').readlines() - #new_jsons = open(f"{params.manifest_dir}/userlibri/{test_set}/{option}_p.jsonl", 'w') - - res_dict = {} - for res in results: - res_dict[res[0]] = ' '.join(res[2]) - - res_dict = sorted(res_dict.items(), key=lambda x:x[0]) - - for k, v in res_dict: - print(k, v) - exit() - - if 0: - for line in jsons: - splited = line.split() - utt_id = splited[1][1:-2] - text_idx = splited.index('"text":') - - pseudo = f'"greedy pseudo text": "{res_dict[utt_id]}",' - #splited.insert(text_idx, pseudo) - splited.insert(len(splited)-2, pseudo) - new_line = ' '.join(splited) - new_line += '\n' - - new_jsons.write(new_line) - - ''' for test_set, test_dl in zip(test_sets, test_dl): results_dict = decode_dataset( dl=test_dl, @@ -851,7 +813,6 @@ def main(): test_set_name=test_set, results_dict=results_dict, ) - ''' ''' test_clean_cuts, test_clean_sets = librispeech.test_clean_cuts(option='user')