#!/bin/bash# Copyright 2012 Johns Hopkins University (Author: Daniel Povey)# Apache 2.0# To be run from ..# Flat start and monophone training, with delta-delta features.# This script applies cepstral mean normalization (per speaker).# Begin configuration section.
nj=4
cmd=run.pl
scale_opts="--transition-scale=1.0 --acoustic-scale=0.1 --self-loop-scale=0.1"
num_iters=40# Number of iterations of training
max_iter_inc=30# Last iter to increase #Gauss on.
totgauss=1000# Target #Gaussians.
careful=false
boost_silence=1.0# Factor by which to boost silence likelihoods in alignment
realign_iters="1 2 3 4 5 6 7 8 9 10 12 14 16 18 20 23 26 29 32 35 38";
config= # name of config file.
stage=-4
power=0.25# exponent to determine number of gaussians from occurrence counts
norm_vars=false# deprecated, prefer --cmvn-opts "--norm-vars=false"
cmvn_opts= # can be used to add extra options to cmvn.# End configuration section.echo"$0$@"# Print the command line for loggingif [ -f path.sh ]; then . ./path.sh; fi
. parse_options.sh || exit1;
if [ $# != 3 ]; thenecho"Usage: steps/train_mono.sh [options] <data-dir> <lang-dir> <exp-dir>"echo" e.g.: steps/train_mono.sh data/train.1k data/lang exp/mono"echo"main options (for others, see top of script file)"echo" --config <config-file> # config containing options"echo" --nj <nj> # number of parallel jobs"echo" --cmd (utils/run.pl|utils/queue.pl <queue opts>) # how to run jobs."exit1;
fi
data=$1
lang=$2
dir=$3
oov_sym=`cat $lang/oov.int` || exit1;
# 按照任务数,将训练数据分成多份,每个任务处理一份数据。
mkdir -p $dir/log
echo$nj > $dir/num_jobs
sdata=