Kaldi中thchs30关于run.sh的一些理解

本文详细解析了Kaldi项目中针对thchs30语料库的run.sh脚本,探讨其在语音识别流程中的作用和步骤,包括数据预处理、模型训练、解码等关键环节。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

  •  
​​#!/bin/bash

. ./cmd.sh ## You'll want to change cmd.sh to something that will work on your system.
           ## This relates to the queue.
. ./path.sh

#在运行run.sh之前首先要运行cmd.sh和path.sh

H=`pwd`  #exp home
n=8      #parallel jobs  并行任务数量,根据cpu的个数来决定

#corpus and trans directory 数据集存放的位置
thchs=/nfs/public/materials/data/thchs30-openslr

#you can obtain the database by uncommting the following lines #||逻辑或 先执行左边
#[ -d $thchs ] || mkdir -p $thchs  || exit 1
#echo "downloading THCHS30 at $thchs ..."
#local/download_and_untar.sh $thchs  http://www.openslr.org/resources/18 data_thchs30  || exit 1
#local/download_and_untar.sh $thchs  http://www.openslr.org/resources/18 resource      || exit 1
#local/download_and_untar.sh $thchs  http://www.openslr.org/resources/18 test-noise    || exit 1

#data preparation    进行数据准备工作
#generate text, wav.scp, utt2pk, spk2utt 生成这些文件
local/thchs-30_data_prep.sh $H $thchs/data_thchs30 || exit 1;

#produce MFCC features 生成MFCC特征
#删除data目录下的mfcc, 并创建mfcc,将大括号里的数据拷贝到mfcc目录
rm -rf data/mfcc && mkdir -p data/mfcc &&  cp -R data/{train,dev,test,test_phone} data/mfcc || exit 1;
for x in train dev test; do
   #make  mfcc 生成mfcc
   steps/make_mfcc.sh --nj $n --cmd "$train_cmd" data/mfcc/$x exp/make_mfcc/$x mfcc/$x || exit 1;
# 调用steps/make_mfcc.s
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值