-
Notifications
You must be signed in to change notification settings - Fork 5.4k
word-based gale arabic setup new tdnn recipe #2934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b93789f
updating gale setup
aarora8 7dcc609
minor update
aarora8 d75efb2
fixing script name
aarora8 bee4ba2
fixing bug
aarora8 715d4de
modification from review, todo: run tri3
aarora8 9c16689
modification from review
aarora8 741c4be
fixing bug
aarora8 8b3ff02
minor fix
aarora8 ea38cda
adding train sat basis, unk phone is dict, minor changes
aarora8 8bc9325
updating results
aarora8 fb90d78
updating results
aarora8 1abaddd
minor fix
aarora8 42aa391
modification from the review
aarora8 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| #!/bin/bash | ||
|
|
||
| # this script is used for comparing decoding results between systems. | ||
| # e.g. local/chain/compare_wer.sh exp/chain/cnn{1a,1b} | ||
|
|
||
| # ./local/chain/compare_wer.sh exp/chain/cnn1a | ||
| # System cnn1a | ||
| # WER 0.61 | ||
| # CER 0.15 | ||
| # Final train prob -0.0377 | ||
| # Final valid prob -0.0380 | ||
| # Final train prob (xent) -0.0830 | ||
| # Final valid prob (xent) -0.0838 | ||
|
|
||
| if [ $# == 0 ]; then | ||
| echo "Usage: $0: <dir1> [<dir2> ... ]" | ||
| echo "e.g.: $0 exp/chain/cnn{1a,1b}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "# $0 $*" | ||
| used_epochs=false | ||
|
|
||
| echo -n "# System " | ||
| for x in $*; do printf "% 10s" " $(basename $x)"; done | ||
| echo | ||
|
|
||
| echo -n "# WER " | ||
| for x in $*; do | ||
| wer=$(cat $x/decode_test/scoring_kaldi/best_wer | awk '{print $2}') | ||
| printf "% 10s" $wer | ||
| done | ||
| echo | ||
|
|
||
| echo -n "# CER " | ||
| for x in $*; do | ||
| cer=$(cat $x/decode_test/scoring_kaldi/best_cer | awk '{print $2}') | ||
| printf "% 10s" $cer | ||
| done | ||
| echo | ||
|
|
||
| if $used_epochs; then | ||
| exit 0; # the diagnostics aren't comparable between regular and discriminatively trained systems. | ||
| fi | ||
|
|
||
| echo -n "# Final train prob " | ||
| for x in $*; do | ||
| prob=$(grep Overall $x/log/compute_prob_train.final.log | grep -v xent | awk '{printf("%.4f", $8)}') | ||
| printf "% 10s" $prob | ||
| done | ||
| echo | ||
|
|
||
| echo -n "# Final valid prob " | ||
| for x in $*; do | ||
| prob=$(grep Overall $x/log/compute_prob_valid.final.log | grep -v xent | awk '{printf("%.4f", $8)}') | ||
| printf "% 10s" $prob | ||
| done | ||
| echo | ||
|
|
||
| echo -n "# Final train prob (xent) " | ||
| for x in $*; do | ||
| prob=$(grep Overall $x/log/compute_prob_train.final.log | grep -w xent | awk '{printf("%.4f", $8)}') | ||
| printf "% 10s" $prob | ||
| done | ||
| echo | ||
|
|
||
| echo -n "# Final valid prob (xent) " | ||
| for x in $*; do | ||
| prob=$(grep Overall $x/log/compute_prob_valid.final.log | grep -w xent | awk '{printf("%.4f", $8)}') | ||
| printf "% 10s" $prob | ||
| done | ||
| echo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| #!/bin/bash | ||
|
|
||
| # this script has common stages shared across librispeech chain recipes. | ||
| # It generates a new topology in a new lang directory, gets the alignments as | ||
| # lattices, and builds a tree for the new topology | ||
| set -e | ||
|
|
||
| stage=11 | ||
|
|
||
| # input directory names. These options are actually compulsory, and they have | ||
| # been named for convenience | ||
| gmm_dir= | ||
| ali_dir= | ||
| lores_train_data_dir= | ||
|
|
||
| num_leaves=6000 | ||
|
|
||
| # output directory names. They are also compulsory. | ||
| lang= | ||
| lat_dir= | ||
| tree_dir= | ||
| # End configuration section. | ||
| echo "$0 $@" # Print the command line for logging | ||
|
|
||
| . ./cmd.sh | ||
| . ./path.sh | ||
| . ./utils/parse_options.sh | ||
|
|
||
| [ -z $lang ] && echo "Set --lang, this specifies the new lang directory which will have the new topology" && exit 1; | ||
| [ -z $lat_dir ] && echo "Set --lat-dir, this specifies the experiment directory to store lattice" && exit 1; | ||
| [ -z $tree_dir ] && echo "Set --tree-dir, this specifies the directory to store new tree " && exit 1; | ||
|
|
||
| for f in $gmm_dir/final.mdl $ali_dir/ali.1.gz $lores_train_data_dir/feats.scp; do | ||
| [ ! -f $f ] && echo "$0: expected file $f to exist" && exit 1 | ||
| done | ||
|
|
||
| if [ $stage -le 11 ]; then | ||
| echo "$0: creating lang directory with one state per phone." | ||
| # Create a version of the lang/ directory that has one state per phone in the | ||
| # topo file. [note, it really has two states.. the first one is only repeated | ||
| # once, the second one has zero or more repeats.] | ||
| if [ -d $lang ]; then | ||
| if [ $lang/L.fst -nt data/lang/L.fst ]; then | ||
| echo "$0: $lang already exists, not overwriting it; continuing" | ||
| else | ||
| echo "$0: $lang already exists and seems to be older than data/lang..." | ||
| echo " ... not sure what to do. Exiting." | ||
| exit 1; | ||
| fi | ||
| else | ||
| cp -r data/lang $lang | ||
| silphonelist=$(cat $lang/phones/silence.csl) || exit 1; | ||
| nonsilphonelist=$(cat $lang/phones/nonsilence.csl) || exit 1; | ||
| # Use our special topology... note that later on may have to tune this | ||
| # topology. | ||
| steps/nnet3/chain/gen_topo.py $nonsilphonelist $silphonelist >$lang/topo | ||
| fi | ||
| fi | ||
|
|
||
| if [ $stage -le 12 ]; then | ||
| # Get the alignments as lattices (gives the chain training more freedom). | ||
| # use the same num-jobs as the alignments | ||
| nj=$(cat ${ali_dir}/num_jobs) || exit 1; | ||
| steps/align_fmllr_lats.sh --nj $nj --cmd "$train_cmd" ${lores_train_data_dir} \ | ||
| $lang $gmm_dir $lat_dir | ||
| rm $lat_dir/fsts.*.gz # save space | ||
| fi | ||
|
|
||
| if [ $stage -le 13 ]; then | ||
| # Build a tree using our new topology. We know we have alignments for the | ||
| # speed-perturbed data (local/nnet3/run_ivector_common.sh made them), so use | ||
| # those. | ||
| if [ -f $tree_dir/final.mdl ]; then | ||
| echo "$0: $tree_dir/final.mdl already exists, refusing to overwrite it." | ||
| exit 1; | ||
| fi | ||
| steps/nnet3/chain/build_tree.sh --frame-subsampling-factor 3 \ | ||
| --context-opts "--context-width=2 --central-position=1" \ | ||
| --cmd "$train_cmd" $num_leaves ${lores_train_data_dir} $lang $ali_dir $tree_dir | ||
| fi | ||
|
|
||
| exit 0; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I forgot to point it out, @aarora8 would you please remove all old NN results above? They are not replicable any more. thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thank you, I am removing it in a new PR.