kaldi中thchs30关于make_mfcc.sh的一些理解

本文主要探讨了kaldi在处理thchs30数据集时,make_mfcc.sh脚本的功能和工作流程。通过参考三篇CSDN博客文章,了解了该脚本在语音识别预处理中的关键步骤,包括音频文件转换、特征提取和MFCC计算等。
摘要由CSDN通过智能技术生成
#!/bin/bash

# Copyright 2012-2016  Johns Hopkins University (Author: Daniel Povey)
# Apache 2.0
# To be run from .. (one directory up from here)
# see ../run.sh for example

# Begin configuration section.
nj=4
cmd=run.pl    #调用run.pl
mfcc_config=conf/mfcc.conf
compress=true #压缩?
write_utt2num_frames=true  # If true writes utt2num_frames. 
write_utt2dur=true
# End configuration section.

echo "$0 $@"  # Print the command line for logging.# 打印命令行到日志,
#$0为执行的命令 $@表示所有参数脚本的内容

if [ -f path.sh ]; then . ./path.sh; fi #如果存在path.sh 就执行
. parse_options.sh || exit 1;#调用的是utils/parse_options.sh,

if [ $# -lt 1 ] || [ $# -gt 3 ]; then
  cat >&2 <<EOF
#cat> 文件名<<eof用来创建文件 在这之后输入任何东西 都是在 文件里的输入完成之后EOF结尾  代表结束

Usage: $0 [options] <data-dir> [<log-dir> [<mfcc-dir>] ]
 e.g.: $0 data/train
Note: <log-dir> defaults to <data-dir>/log, and
      <mfcc-dir> defaults to <data-dir>/data.
Options:
  --mfcc-config <config-file>          # config passed to compute-mfcc-feats.
  --nj <nj>                            # number of parallel jobs.
  --cmd <run.pl|queue.pl <queue opts>> # how to run jobs.
  --write-utt2num-frames <true|false>  # If true, write utt2num_frames file.
  --write-utt2dur <true|false>         # If true, write utt2dur file.
EOF
   exit 1;
fi

data=$1 #将第一个参数赋值给data
if [ $# -ge 2 ]; then #如果参数大于等于2,将第二
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值