评估自动语音识别(ASR)假设,即计算单词错误率。
asr_evaluation的Python项目详细描述
ASR U评估
用于评估asr假设(即字错误率和字)的python模块 识别率)
这个模块依赖于editdistance 项目,用于计算任意序列之间的编辑距离
这个程序输出的格式是基于 与sphinx asr社区中常用的align.c程序的想法相同。 如果既不打印实例也不打印混淆,则可能会运行得更快。
如果您有任何意见、问题或问题,请告诉我。
输出
程序输出三个标准测量值:
- Word error rate (WER)
- 单词识别率(对齐中匹配的单词数除以引用中的单词数)
- 句子错误率(SER)(错误句子数除以句子总数)。
安装和卸载
最简单的安装方法是使用pip:
pip install asr-evaluation
或者,您可以克隆此git repo并使用distutils安装:
git clone git@github.com:belambert/asr-evaluation.git
cd asr-evaluation
python setup.py install
要使用pip卸载:
pip uninstall asr-evaluation
命令行用法
有关命令行用法,请参见:
wer --help
它应该显示如下内容:
usage: wer [-h] [-i | -r] [--head-ids] [-id] [-c] [-p] [-m count] [-a] [-e]
ref hyp
Evaluate an ASR transcript against a reference transcript.
positional arguments:
ref Reference transcript filename
hyp ASR hypothesis filename
optional arguments:
-h, --help show this help message and exit
-i, --print-instances
Print all individual sentences and their errors.
-r, --print-errors Print all individual sentences that contain errors.
--head-ids Hypothesis and reference files have ids in the first
token? (Kaldi format)
-id, --tail-ids, --has-ids
Hypothesis and reference files have ids in the last
token? (Sphinx format)
-c, --confusions Print tables of which words were confused.
-p, --print-wer-vs-length
Print table of average WER grouped by reference
sentence length.
-m count, --min-word-count count
Minimum word count to show a word in confusions.
-a, --case-insensitive
Down-case the text before running the evaluation.
-e, --remove-empty-refs
Skip over any examples where the reference is empty.
贡献和行为准则
对于贡献,最好是Github问题和拉取请求适当的 建议的测试和文档。
行为准则应该是合理的,特别是 Contributor Covenant