Is it possible to add an optional ref param for asr.transcibe method?
CopyNinja1999 opened this issue · comments
For calculating wer
Could you please elaborate more ?
When you run the inference, the wer
is stored in the wer
attribute.
For example:
asr = ASRModel(model='/path/to/mms/model')
files = ['path/to/media_file_1', 'path/to/media_file_2']
transcriptions = asr.transcribe(files, lang='eng', align=False)
print(asr.wer) # to get the wer of the last inference
Hi, thanks for your reply. What I want to do is:
asr = ASRModel(model='/path/to/mms/model')
files,ref = read_file('audio.txt') #txt file include path and ref
transcriptions = asr.transcribe(files, lang='eng', align=False, ref=ref)
print(asr.wer) # to get the wer of the last inference
since all the ref is set as "dummy dummy" by default.
And what is the content of the audio.txt
file ?
Do you want to change the "dummy dummy" text in the dev.wrd
file ?
audio.txt contains the path and the corresponding transcription.
``·
kss_wavs/1_0367.wav|busaneun gugyeonghal gosi manayo.
kss_wavs/1_0686.wav|tereoriseuteudeureun injildeurui songwa bareul batjulro mukkeotda.
kss_wavs/1_0878.wav|uyurang beoteoreul milgarue seokkeuseyo.
···
So basically the refs should go to the dev.word
file instead of the "dummy dummy" text ?