kaldi运行thchs30数据集lexicon.txt ERROR

  1. kaldi/egs/thchs30创建thchs30-openslr,将所有压缩包解压到这下面,文件目录如下
thchs30-openslr
├── data_thchs30
├── resource
└── test-noise

 2.打开s5目录,编辑cmd.sh. 修改为本地运行, 如下

export train_cmd=run.pl
export decode_cmd=run.pl
export mkgraph_cmd=run.pl
export cuda_cmd=run.pl

3.修改s5下面的run.sh脚本,可以改两个地方

#n=4      #parallel jobs 修改并行任务的数量,可以根据cpu的个数来定
n=2      #parallel jobs
#thchs=/nfs/public/materials/data/thchs30-openslr #修改文件路径,改成你的文件路径
thchs=/home/kaldi/egs/thch30/thchs30-openslr

然后./run.sh, 出现exicon.txt错误:

Checking data/dict/lexicon.txt
--> reading data/dict/lexicon.txt
--> text seems to be UTF-8 or ASCII, checking whitespaces
--> text contains only allowed whitespaces
--> ERROR: phone "file" is not in {, non}silence.txt (line 2)
--> ERROR: phone "(standard" is not in {, non}silence.txt (line 2)
--> ERROR: phone "input)" is not in {, non}silence.txt (line 2)
--> ERROR: phone "matches" is not in {, non}silence.txt (line 2)

这是grep命令引起的,打开run.sh,找到

grep -v '<s>' | grep -v '</s>' | sort -u > data/dict/lexicon.txt || exit 1;

改为

grep -v -a '<s>' | grep -v -a '</s>' | sort -u > data/dict/lexicon.txt || exit 1;

运行OK

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值