decode procedure
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的更多相关文章
- 一个不简单的Procedure body例子
create or replace package body CountBankData_20150617 is type cursorCommon is ref cursor; --游标类型 str ...
- 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 ...
- Oracle数据库自动备份SQL文本:Procedure存储过程,View视图,Function函数,Trigger触发器,Sequence序列号等
功能:备份存储过程,视图,函数触发器,Sequence序列号等准备工作:--1.创建文件夹 :'E:/OracleBackUp/ProcBack';--文本存放的路径--2.执行:create or ...
- SQL Server 在多个数据库中创建同一个存储过程(Create Same Stored Procedure in All Databases)
一.本文所涉及的内容(Contents) 本文所涉及的内容(Contents) 背景(Contexts) 遇到的问题(Problems) 实现代码(SQL Codes) 方法一:拼接SQL: 方法二: ...
- flask+sqlite3+echarts2+ajax数据可视化报错:UnicodeDecodeError: 'utf8' codec can't decode byte解决方法
flask+sqlite3+echarts2+ajax数据可视化报错: UnicodeDecodeError: 'utf8' codec can't decode byte 解决方法: 将 py文件和 ...
- MySQL:procedure, function, cursor,handler
Procedure & Function Procedure 语法: CREATE [DEFINER = { user | CURRENT_USER }] PROCEDURE sp_name ...
- [LeetCode] Decode String 解码字符串
Given an encoded string, return it's decoded string. The encoding rule is: k[encoded_string], where ...
- [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 ...
- [LeetCode] Decode Ways 解码方法
A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' - ...
- Python报错UnicodeDecodeError: ascii codec can t decode byte 0xe0 ...解决方法
用命令(python setup.py install)安装webpy时候总是报错 在网上搜索到的解决方法如下: 1. 这是Python 2 mimetypes的bug 2. 需要将Python2.7 ...
随机推荐
- Andorid 悬浮窗的适配指北
我们有时候需要显示一个悬浮窗,悬浮窗由服务开启,里面会有一些操作 但是我在开发时遇到高版本 Android12 和低版本4.4 ,显示不一样的地方 这边整理了下适配的方法方案 一:根据版本不一的时候, ...
- es启动和停止命令
1.启动命令 使用elasticsearch用户来启动,进入bin目录(例:home/db_app/elasticsearch/elasticsearch-6.5.4/elasticsearch-cl ...
- Java 分布式锁实现的一些实践
近期换工作,闲下来有点时间写点东西,在这里分享一些心得体会 背景:我们在做后端开发时,无法避免的会遇到一些一致性问题,有时候我们前端的小伙伴或者rpc接口的调用方,在很短的时间间隔内给我们相同的请求, ...
- java连接couchbase的memcache
没有参考代码的时候重新写还是有点累的,这是重温了,第一次写的时候参考了别的一些乱七八糟的代码,虽然不是和这个一样的,不过在不懂的情况下还是很快写出来了,反而是这次光是找需要哪些jar都搞了半天,最后发 ...
- Collections.synchronizedList使用方法陷阱(1)
无意发现了这个例子,拿来记住 @NotThreadSafeclass BadListHelper <E> { public List<E> list = Collecti ...
- TypeScript Array(数组)
TypeScript Array(数组) 数组对象是使用单独的变量名来存储一系列的值. 数组非常常用. 假如你有一组数据(例如:网站名字),存在单独变量如下所示: var site1="Go ...
- 计算机意外地重新启动或遇到错误windows安装无法继续解决方法
计算机意外地重新启动或遇到错误windows安装无法继续解决步骤如下: 当win10在安装过程中一直卡在"海内存知己,天涯若比邻"时同样实用 解决方法: 按住shift+f10(或 ...
- B. Going to the Cinema
https://codeforces.com/contest/1782/problem/B 题目大意就是给定n个人,每个人有一个除自己之外的最少陪同人数,选一部分人去电影院,要求去的人人数大于等于去的 ...
- windows 和 linux 之间的文件传输操作
参考:http://www.jb51.net/article/123378.htm 本文介绍,如何实现 windows 主机与 linux 虚拟机之间的文件传输. 一.获取虚拟机 IP 地址 要实现 ...
- OpenGL_Extension_Viewer
使用OpenGL,查验一下我电脑显卡的相关配置