9 lines
365 B
Bash
Executable File
9 lines
365 B
Bash
Executable File
#/bin/bash
|
|
|
|
cut -f2 $1 | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > hypothesis.trn
|
|
cut -f3 $1 | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > reference.trn
|
|
|
|
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout > results.txt
|
|
python3 count_metrics.py results.txt
|
|
paste results.txt wer.txt > tmp.txt && mv tmp.txt results.txt
|