|
|
|
import os |
|
from benchmark_utils import ASRmanifest, wer_from_csv |
|
|
|
|
|
|
|
corpora_root = '/shared/corpora/forSAGA/' |
|
manif_root = '/shared/corpora/forSAGA/data_manifests/' |
|
output_dir = './ASR_output/' |
|
manifest='LEVI_LoFi_v2_TEST_norm_wer_isat' |
|
model_name= 'LEVI_whisper_medium.en' |
|
hf_org = 'levicu' |
|
model_path = f'{hf_org}/{model_name}' |
|
|
|
|
|
corpora_root = '/shared/corpora/' |
|
manif_root = '/shared/corpora/data_manifests/ASR/' |
|
output_dir = '/home/rosy/whisat-output/' |
|
manifest= 'LEVI_LoFi_v2_TEST_punc+cased' |
|
model_name= 'LEVI_LoFi_v2_MediumEN_Lora_Int8' |
|
model_path='/shared/models/LEVI_LoFi_v2_MediumEN_Lora_Int8/final/' |
|
model_path='openai/whisper_medium.en' |
|
|
|
|
|
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' |
|
) |
|
|
|
|
|
|