评估自动语音识别(ASR)假设,即计算单词错误率。

asr_evaluation的Python项目详细描述


ASR U评估

Build StatusPyPI versioncodecov

用于评估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

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java为什么我的代码永远运行?它只是一堆带int的for循环,应该是递减的?   java如何更改IntelliJ IDEA中的XML缩进?   java如何使未填充的int数组不打印0?   eclipse My Weka Java代码结果*Weka*虚拟*STRING*用于*STRING*属性*   java泄漏了Windows com。安卓内部的政策恳求   java这个无限循环的原因是什么?   swing My标签在Java中很模糊   java如何在组件表示存储扩展中获取组件对象   java如何避免selenium网格中的会话超时   Java乘法测验,如果答案错误,如何循环   在Java HttpServlet Google app engine中保存对象   java ArrayList过滤器   java跳跃减慢了xvelocity:使用Libgdx/Box2D进行跳跃和跑步   java删除、复制和修改pom。xml文件   当提供的时区与服务器的时区相同时,RestCall中的java@DateTimeFormat(iso=iso.DATE_TIME)不工作   java Spring批处理多线程默认限制为10隐式?   安卓错误java。lang.UnsupportedOperationException:无法转换为维度:type=0x1