-
Notifications
You must be signed in to change notification settings - Fork 0
Kaldi DNN Simple Notes
How to Train a Deep Neural Net Acoustic Model with Kaldi
Labeled frames(phoneme-to-audio alignements) generated by a GMM-HMM system are needed for DNN trainning.
-
data/train(generated bylocal/prepare_data.sh) -
data/lang(generated bylocal/prepare_lang.sh) -
exp/tri*_ali(generated byalign_si.sh) -
mfcc(generated bymake_mfcc.sh)
steps/nnet2/train*.sh
4 obligatory arguments are:
-
data/train(the trainning data) -
data/lang(the language dir) -
exp/tri*_ali(the alignments from the previous GMM-HMM model) -
$exp_dir(for DNN model to output to)
steps/nnet2/decode*.sh
6 args:
-
exp/tri\*/graph(the decoding graph from the GMM-HMM) -
data/test(the test data) -
$exp_dir/final.mdl(trained DNN acoustic model -
UNK(the unknown phone) -
SIL(the silence phone -
$exp_dir/decode(new dir to save decoding info in (lattices, etc))
utils/best_wer.sh
Get the score from the results.
- Args for the DNN
- Some files in
$data_dir,$lang_dir,$ali_dir -
tree(copied from the GMM-HMM),num_jobs,log
get_lda.sh
This transformation matrix will be applied to our spliced features before we take them in as input to our DNN.
线性判别分析(Linear Discriminant Analysis)(一) - JerryLead - 博客园
get_egs.sh
Splits the training data into training and validation. The validation is used fo diagnostics during the training iterations.
-
Define the dimensions and architecture of our neural net in
nnet.config:-
SpliceComponentdefines the size of the window of feature-frame-splicing to perform. -
FixedAffineComponentis our LDA-like transform created by get_lda_simple.sh. -
AffineComponentis the standard Wx+b affine transform found in neural nets. This first AffineComponent represents the weights and biases between the input layer and the first hidden layer. -
TanhComponentis the standard tanh nonlinearity. -
AffineComponentis the standard Wx+b affine transform found in neural nets. This second AffineComponent represents the weights and biases between the hidden layer and the output layer. -
SoftmaxComponentis the final nonlinearity that produces properly normalized probabilities at the output.
-
-
Define the structure of the hidden layers in
hidden.config -
Initialize the first neural net, aka
0.mdlwithnnet-am-init, args are:$ali_dir/tree$lang_dir/topo"nnet-init $exp_dir/nnet.config -|"-
$exp_dir/0.mdl(output)
-
Train the transitions of the HMMs in the DNN-HMM acoustic model with
nnet-train-transitions, args are:$exp_dir/0.mdl"ark:gunzip -c $ali_dir/ali.*.gz|"$exp_dir/0.mdl
-
The Main Training Loop, which will update params via backprop. (
nnet-train-parallel)
-
-
Overview
- Terminoloty
- Overall Procedure
-
Procedure
- Data Preperation
- Dictionay Preperation
- Extract MFCC features
- Train monophone models
- Align audio with the acoustic models
- Train triphone models
- Re-align audio with the acoustic models & re-train triphone models
- Kaldi DNN Simple Notes
-
Overview