评估自动语音识别(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文件分块,获取长度字节   java嵌入式Tomcat不执行jsf页面   java我的数据库中有2个实体,但hibernate返回其中6个。   java如何基于逗号拆分字符串   java取消已经运行的CompletableFutures的预期模式是什么   java如何在informix中从另一个数据库复制表ddl和数据   为什么图片是黑色的?   java根据字符串数组中的单词筛选列表   Java8的集合。平行流有效吗?   Kotlin中的java静态内部类   java如何在GUI中生成一列字符串   javafx如何正确使用高对比度主题?   带空格的javascript Httpurlconnection参数   java如何设置GridBagLayout的约束   java如何在一个线程可能尚未初始化时关闭另一个线程   java将简单时间格式转换为特殊时间格式(hhmmt)   安卓/java阵列重复过滤器的问题   java在队列的链接实现下,入队和出队是如何工作的   java更新sql外键约束