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. Github搜索优质项目方法

    [转载]:https://www.zhihu.com/question/20084458 搜索结果会显示非常多的开源项目,简直让你应接不暇,无从下手,很多小伙伴搜到这一步就放弃了,因为项目太多了,根本 ...

  2. String intern的理解

    String s1 = "Programming";   s1在栈内存中,Programming在常量池中. String s2 = new String("Progra ...

  3. Java之时间类

    时间类 Date类 ZonedDateTime: 带时区的时间 ZoneId: 带时区 Instant: 时间戳 日期格式化类 SimpleDateFormat DateTimeFormatter D ...

  4. string字符串类型的属性及各种方法

    C# 字符串(String) 在 C# 中,您可以使用字符数组来表示字符串,但是,更常见的做法是使用 string 关键字来声明一个字符串变量.string 关键字是 System.String 类的 ...

  5. oracle的ASM扩容

    #查看服务器上总共有多少个asmdisk [grid@rkdb1]$ asmcmd lsdsk --discovery Path /dev/oracleasm/disks/OCPDATA1 /dev/ ...

  6. 手写reduce()

    function reduce(arr, callBack ,initVal){ if(!Array.isArray(arr) || !arr.length || typeof callBack != ...

  7. iOS底层原理01:源码探索的三种方式

    ios 开发探索源码三种方法 1.下符号断点的形式直接跟流程 2.通过摁住 control + step  into 3.汇编查看跟流程 1.符号断点直接跟流程 以alloc为例: 选择断点Symbo ...

  8. Java数组之什么是数组?+ 数组的声明和创建

    数组 数组是相同类型数据的有序集合. 数组描述的是相同类型的若干个数据,按照一定的先后次序排序组合而成. 其中,每一个数据称作一个数组元素,每个数组元素可以通过一个下标来访问它们. 数组声明创建 首先 ...

  9. QFramework UI 笔记(后续不断 直到UKitI篇结束)

    1.所有的UIElement  传消息给 UIPanel 时,必须先注册 SendEvent();      RegisterEvent(); 2.注意Unity直接生成控件的名称,命名带(1)之类的 ...

  10. 【Docker】基本使用

    服务 启动docker systemctl start docker 重启docker systemctl restart docker 停止docker systemctl stop docker. ...