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. jquery 操作表格 jQuery操作表格(table)的常用方法、技巧汇总

    以下列出13个jQuery操作table常用到的功能: 1.鼠标移动行变色 $('#table1 tr').hover(function(){ $(this).children('td').addCl ...

  2. Java lombok包中的常用注解,便捷化开发POJO类

    lombok包中的一些常用注解 如何使用Lombok?Lombok提供注解方式来提高代码的简洁性,常用注解有:    @Data    @Setter @Getter    @NonNull    @ ...

  3. R语言3D图导出矢量图有bug

    谁不喜欢高清无码?rgl.snapshot就是个渣渣 首先,用rgl画3D图并调整好视角,代码如下: z <- 2 * volcano # Exaggerate the reliefx < ...

  4. 自定义类型与Qt元对象系统

    个人发现一篇关于在Qt中使用元对象系统支持自定义类型的好博文,记录下防止丢失(如有侵权,烦请告知删除).博文原地址:http://qtdebug.com/qtbook-misc-qvariant/ Q ...

  5. Mysql数据库基础第二章:(六)连接查询

    Mysql数据库基础系列 软件下载地址 提取码:7v7u 数据下载地址 提取码:e6p9 mysql数据库基础第一章:(一)数据库基本概念 mysql数据库基础第一章:(二)mysql环境搭建 mys ...

  6. [CSS]使用JS改变元素位置,操作css比较困难时,可更换元素的类名

    本人大菜鸟一枚,以此作为记录. 使用到技术栈jQuery. 开发中遇到某个元素需要在页面上切换 left: 0px 为 right: 0px 的需求,直接操作css会导致同时存在left和right属 ...

  7. Python3之并发(七)---线程同步队列(queue)

    queue模块实现了多生产者,多消费者队列 queue模块的常用类和异常 queue.Queue(maxsize=0) 先进先出(FIFO)的队列, maxsize: 队列的大小(即队列的元素个数), ...

  8. Qt中资源文件qrc中的路径访问

    首先先看一下我们的qrc文件目录结构:  在文件系统中的目录结构是这样的:   请务必注意这边的前缀(按照网友推荐,大部分项目前缀都是只写一个"/"):  接下来进入正题,我们来分 ...

  9. 048_Search Lookup

    The Problematic Situation:When you add any lookup in Salesforce on a layout from one object to anoth ...

  10. Echarts xAxis、yAxis

    2017年08月06日 09:10:12 数据架构师 阅读数:37641更多 所属专栏: Echarts数据可视化    版权声明:本文为博主原创文章,转载请注明来源.开发合作联系82548597@q ...