#!/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,将第二
kaldi中thchs30关于make_mfcc.sh的一些理解
最新推荐文章于 2021-05-20 11:53:20 发布
本文主要探讨了kaldi在处理thchs30数据集时,make_mfcc.sh脚本的功能和工作流程。通过参考三篇CSDN博客文章,了解了该脚本在语音识别预处理中的关键步骤,包括音频文件转换、特征提取和MFCC计算等。
摘要由CSDN通过智能技术生成