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 ...
随机推荐
- 数字图像处理之直方图处理——a cute dog huang
关于图像处理的知识,确实很棒,在此感谢:https://blog.csdn.net/mary_0830/article/details/89003488 直方图处理概念灰度级范围为[0,L-1]的数字 ...
- mysql 取出分组后价格最高的数据
如何用mysql 取出分组后价格最高的数据 ? 看到这个问题,就想到了用 max 函数和 group by 函数,先 group by 然后取得 max, 但是这样真的可以吗? 不可以 ! 为什么? ...
- response status is 500 https://localhost:7129/swagger/v1/swagger.json
SwaggerGeneratorException: Conflicting method/path combination "GET Test" for actions - To ...
- django项目中使用swagger来实现接口文档自动生成
一.Swagger 一般我们在对接前后端的时候,都需要提供相应的接口文档.对于后端来说,编写接口文档即费时费力,还会经常因为没有及时更新,导致前端对接时出现实际接口与文档不一致.而且手写接口文档还容易 ...
- 公式b-(a-b)
- SFINAE几种实现方式
一.通过函数返回值实现 template<class T> typename std::enable_if<std::is_trivially_default_constructib ...
- Nginx+Tomcat 负载均衡配置
一.问题引入: Nginx+Tomcat 是目前主流的java web架构,如何让 nginx+tomcat 同时工作呢,也可以说如何使用 nginx 来反向代理 tomcat 后端均衡呢? 二.JA ...
- Centos 7.5 MySql的安装和配置
一.安装 三个步骤: wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpmyum -y ins ...
- [BalticOI 2017] Cat in a tree
[BalticOI 2017] Cat in a tree 神仙美少女 Tweetuzki 学姐用了长剖+线段树,私以为长剖可以做到线性. 简要题意 给定 \(n\) 个点的树,点集 \(S\) 合法 ...
- ORACLE 创建只读用户
create user cxuser01 identified by test123 default tablespace USERS temporary tablespace TEMP; --创建 ...