Files
freedakgmail 6116b1f3c6
Update API Documentation / build-api-docs (push) Has been cancelled
Initial commit: FunASR Speech Recognition Toolkit
Add complete FunASR codebase including models, runtime, and documentation.
2026-07-09 22:38:58 +08:00

24 lines
622 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved.
# MIT License (https://opensource.org/licenses/MIT)
set -euo pipefail
workspace=$(pwd)
infer_dir="${workspace}/examples/industrial_data_pretraining/paraformer/outputs_lora/infer"
ref_file="${infer_dir}/text.ref"
hyp_file="${infer_dir}/text.hyp"
cer_file="${infer_dir}/text.cer"
python -m funasr.metrics.wer \
++ref_file="${ref_file}" \
++hyp_file="${hyp_file}" \
++cer_file="${cer_file}" \
++cn_postprocess=false
# Show final CER summary
if [ -f "${cer_file}" ]; then
tail -n 3 "${cer_file}"
fi