| |
| import os |
| from benchmark_utils import ASRmanifest, wer_from_csv |
|
|
|
|
| |
| corpora_root = '~/corpora/forSAGA/' |
| manif_root = '~/corpora/forSAGA/data_manifests/' |
| output_dir = './ASR_output/' |
| manifest='LEVI_LoFi_v2_TEST_punc+cased' |
| model_name= 'LEVI_whisper_medium.en' |
| hf_org = 'levicu' |
| model_path = f'{hf_org}/{model_name}' |
|
|
| |
| manifest_csv=os.path.join(manif_root, f'{manifest}.csv') |
| out_csv=os.path.join(output_dir,f'{model_name}_on_{manifest}.csv') |
|
|
| |
| ASRmanifest( |
| manifest_csv=manifest_csv, |
| out_csv=out_csv, |
| corpora_root=corpora_root, |
| model_path=model_path, |
| ) |
|
|
| |
| print(f'reading results from {out_csv}') |
| print(f'{model_name} on {manifest}') |
| wer_meas=wer_from_csv( |
| out_csv, |
| refcol='transcript', |
| hypcol='asr', |
| printout=True, |
| text_norm_method='levi' |
| ) |
|
|
|
|
|
|
|
|