1  test data preparation

1>  select representative data voice to match real application scenario

test device  :containing noise

read by text : relatively clean

tts : synthesis

2> get right label for test data

  i. call other asr api to do the labeling

  ii.use our asr  model to do this

  draw a parallel between the two results above

2 get standard label

python get_label_ref.py $test_dir  $ref

3 decoding

for file in $test_dir/*
do
run.pl $decode_dir/decode.`basename $file`.log \
online2-wav-nnet3-latgen-faster --online=true --do-endpointing=false --frame-subsampling-factor=3 \
--config=conf/online.conf --max-active=7000 --beam=15.0 --lattice-beam=6.0 --acoustic-scale=1.0 \
--word-symbol-table=exp/chain/tdnn/graph/words.txt exp/chain/tdnn/final.mdl exp/chain/tdnn/graph/HCLG.fst \
"ark:echo utterance-id1 utterance_`basename $file`|" "scp:echo utterance_`basename $file` $file |" ark:/dev/null
done

4 result deal

#get test_set's decoding result
for file in $decode_dir/*
do
name=`basename $file`
label=`cat $file | grep '^utterance'`
label_1=`echo ${label/utterance_/}`
label_2=`echo ${label_1/.wav/}`
echo $label_2 > $text/${name}
done

5 get wer

if you want to get CER, you can set a flag to do and get cer result


if [ $flag == 'cer' ] || [ $flag == 'CER' ] ;then
echo "do CER estimation:"
PYTHONIOENCODING=utf8 python3 handle_file.py $text $ref
else
echo "do WER estimation:"
fi

 

and the default performance means WER

#each file to compute WER
for file in ${text}/*
do
cat $file >> $total_content
compute-wer --text --mode=present ark:$ref ark:$file > $log_wer/wer_`basename $file`
done
#all files to compute a overall WER
compute-wer --text --mode=present ark:$ref ark:$total_content

decode procedure的更多相关文章

  1. 一个不简单的Procedure body例子

    create or replace package body CountBankData_20150617 is type cursorCommon is ref cursor; --游标类型 str ...

  2. Linking code for an enhanced application binary interface (ABI) with decode time instruction optimization

    A code sequence made up multiple instructions and specifying an offset from a base address is identi ...

  3. Oracle数据库自动备份SQL文本:Procedure存储过程,View视图,Function函数,Trigger触发器,Sequence序列号等

    功能:备份存储过程,视图,函数触发器,Sequence序列号等准备工作:--1.创建文件夹 :'E:/OracleBackUp/ProcBack';--文本存放的路径--2.执行:create or ...

  4. SQL Server 在多个数据库中创建同一个存储过程(Create Same Stored Procedure in All Databases)

    一.本文所涉及的内容(Contents) 本文所涉及的内容(Contents) 背景(Contexts) 遇到的问题(Problems) 实现代码(SQL Codes) 方法一:拼接SQL: 方法二: ...

  5. flask+sqlite3+echarts2+ajax数据可视化报错:UnicodeDecodeError: 'utf8' codec can't decode byte解决方法

    flask+sqlite3+echarts2+ajax数据可视化报错: UnicodeDecodeError: 'utf8' codec can't decode byte 解决方法: 将 py文件和 ...

  6. MySQL:procedure, function, cursor,handler

    Procedure & Function Procedure 语法: CREATE [DEFINER = { user | CURRENT_USER }] PROCEDURE sp_name ...

  7. [LeetCode] Decode String 解码字符串

    Given an encoded string, return it's decoded string. The encoding rule is: k[encoded_string], where ...

  8. [LeetCode] Encode and Decode Strings 加码解码字符串

    Design an algorithm to encode a list of strings to a string. The encoded string is then sent over th ...

  9. [LeetCode] Decode Ways 解码方法

    A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' - ...

  10. Python报错UnicodeDecodeError: ascii codec can t decode byte 0xe0 ...解决方法

    用命令(python setup.py install)安装webpy时候总是报错 在网上搜索到的解决方法如下: 1. 这是Python 2 mimetypes的bug 2. 需要将Python2.7 ...

随机推荐

  1. ICPC2021 沈阳站

    B-Bitwise Exclusive-OR Sequence 牛客网 题意:对于\(n(n<=1*10^5)\)个数的序列,给定\(m(m<=2*10^5)\)个限制条件,每个限制条件形 ...

  2. react的生命周期和使用

    完整的生命周期 我们都知道生命周期分为三个大阶段: 挂载 更新 卸载 挂载的时候我们我们有 constructor . getDerivedStateFromProps .render . compo ...

  3. 90、java ftp 读取文件

    https://blog.csdn.net/qq_38380025/article/details/80679128

  4. maridb数据库表及字段增删改

    mariadb数据类型 mariadb数据类型分为数字.日期.时间以及字符串值. 适用类型原则:够用就行,尽量使用范围小的,而不用大的 常用数据类型: 1.整数 int,bit   #例如 年纪 适用 ...

  5. LaTex【七】latex换行顶格、不缩进

    LaTex换行会默认缩进,如果想不缩进只需要在不需要缩进的内容前面加上 \noindent 命令 ababababababababababab \noindent 不缩进不缩进

  6. Python 封装cmd 执行命令

    1.利用shell中执行成功返回0 失败非零  封装成函数 # coding: utf-8 from subprocess import Popen, PIPE, STDOUT import sys ...

  7. MacOS如何使用emoji表情?

    Emoji作为一种表情符号,被现代计算机系统都支持的Unicode编码所采纳,普遍应用于各种社交网络中.而苹果作为第一个引用该这种表情符号的公司,其这种表情符号无疑是同类中最佳的.因为是被Unicod ...

  8. Pytest全局用例共用之conftest.py详解

    本文转自:https://blog.csdn.net/qq_36502272/article/details/102975467 一.'conftest特点: 1.可以跨.py文件调用,有多个.py文 ...

  9. Java 一次操作多条数据

    //新增 <insert id="insertSelectiveList" useGeneratedKeys="true" parameterType=& ...

  10. Python学习笔记之7.5 - 定义有默认参数的函数》》》直接在函数定义中给参数指定一个默认值,默认参数的值应该是不可变的对象

    问题: 你想定义一个函数或者方法,它的一个或多个参数是可选的并且有一个默认值. 解决方案: 定义一个有可选参数的函数是非常简单的,直接在函数定义中给参数指定一个默认值,并放到参数列表最后就行了.例如: ...