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 ...
随机推荐
- 手机安装python环境
一.安装Termux环境 1.下载Termux Qpython 安装以后玩爬虫各种报错,也就不纠结了,直接弄Termux 虚拟环境 下载链接:https://wiki.termux.com/wiki/ ...
- Windows初始化.net core环境
1.项目使用.ner core版本(例:.net core.3.1) 1.1安装运行环境 https://dotnet.microsoft.com/en-us/download 1.2安装.net 运 ...
- gorm去重查询 iris框架
写练习 demo 时遇到需要进行去重查询,gorm没有db.distinct()的写法 // 数据库的表字段 type Pro_location_relation struct { Id int64 ...
- IntelliJ IDEA修改系统缓存目录
IntelliJ IDEA修改系统缓存目录 博客分类: intellij IDEA使用 IntelliJ IDEAIDEA缓存 阅读更多 intellij IDEA在第一次启动时,会在${user. ...
- redis过期事件监听
1 修改 redis.conf配置文件: K Keyspace events, published with keyspace@ prefix事件 E Keyevent events, publish ...
- 【C学习笔记】day2-1 给定两个整形变量的值,将两个值的内容进行交换
#include<stdio.h> int main() { int a=0, b=1,temp; temp = b; b = a; a = temp; //printf("%d ...
- kibana启动及导出PDF报错
kibana启动及导出PDF报错,可能是由于kibana需要的系统依赖没有安装 CentOS/RHEL系统需要安装以下依赖: ipa-gothic-fonts xorg-x11-fonts-100dp ...
- 面试视频知识点整理1-13(mvvm框架)
1.了解mvvm框架吗? Vue.js React Angular 2.谈谈你对mvvm的认识 由mvc和mvp演变而来 3.双向绑定是什么原理? object.defineProperty的用法要熟 ...
- 物流扫码固定式扫描相机BXT-10M 自动分拣读码器 条码识别扫码器
物流扫码固定式扫描相机BXT-10M 自动分拣读码器 条码识别扫码器 VX : orihard2014 标签: 条码识别扫码器, 自动分拣读码器, 物流扫码固定式扫描相机, 物流扫码相机
- C#读取XML字符串及将XML字符串反序列化为对象
在开发中遇到调用接口范围XML格式结果情况,获取结果中我们需要的信息则可能需要这两种数据处理: 1.如何将xml字符串转换为xml对象,及查询想要的节点: 通过XmlDocument对象加载xml字符 ...