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. java和js 用正则表达式切割省市县的代码

    String s= "安徽省合肥市肥西县上派镇"; // String regex="(\\?[^省]+自治区|.*?省|.*?行政区|.*?市)(\\?[^市]+自治州 ...

  2. 对VC中有关数据类型转换的整理

    原文地址:http://spaces.msn.com/wsycqyz/blog/cns!F27CB74CE9ADA6E7!152.trak 对VC中有关数据类型转换的整理   说明:本文纯粹是总结一下 ...

  3. jQuary学习(一)

    一.jQuary简介 jQuery是继prototype之后又一个优秀的Javascript框架.其宗旨是--WRITE LESS,DO MORE,写更少的代码,做更多的事情. jQuery能够使用户 ...

  4. Web前端单词大全

    style 修饰width 宽度height 高度title 想说明的text-align 水平对齐方式center 居中 left 居左 right 居右line-height 垂直对齐方式/行高 ...

  5. 关于uniapp 打自定义基座部分手机不能自动安装的问题

    部分手机指的是-------没错就辣鸡 vivo手机 解决办法----进入手机文件管理-----根目录-----会有一个你打包的app.apk文件,手动安装一下就好了 搜索 复制

  6. map()函数应用

    title: map()函数应用 author: 杨晓东 permalink: map()函数应用 date: 2021-10-02 11:27:04 categories: - 投篮 tags: - ...

  7. window.open在打开pdf时直接下载而不是查看

    一般这是url请求的原因导致的, 可以考虑这种写法 window.open(link+'?response-content-type=application/pdf') 加上后面这段可以转为查看

  8. Vuex4.x 简介及state、getters、mutations、actions详解(OptionApi 和 CompositionApi)

    http://t.zoukankan.com/yaopengfei-p-15439203.html 作       者 : Yaopengfei(姚鹏飞) 博客地址 : http://www.cnbl ...

  9. Linux7重置root管理员密码

    1.先确定是否为rhel 7系统(别的系统我没有试过,请慎重尝试) cat /etc/redhat-release 查看Linux的操作系统 2.按键盘e键进入内核编辑界面 3.找到linux16这行 ...

  10. 钉钉机器人webhook的使用

    1.群启动webhook机器人:右上角设置--智能助手---添加机器人---其他机器人 2.获取webhook地址 3.调用方式不一样,则访问方式就不一样 ---------------------- ...