Skip to content

Commit

Permalink
Use wider beams by default to avoid accuracy confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
nshmyrev committed Jun 19, 2020
1 parent f6c115d commit 9d26014
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,9 @@ Model::Model(const char *model_path) : model_path_str_(model_path) {
void Model::ConfigureV1()
{
const char *extra_args[] = {
"--min-active=200",
"--max-active=3000",
"--beam=10.0",
"--lattice-beam=2.0",
"--max-active=7000",
"--beam=13.0",
"--lattice-beam=6.0",
"--acoustic-scale=1.0",

"--frame-subsampling-factor=3",
Expand Down Expand Up @@ -172,10 +171,6 @@ void Model::ConfigureV2()
decodable_opts_.Register(&po);
po.ReadConfigFile(model_path_str_ + "/conf/model.conf");

KALDI_LOG << "Decoding params beam=" << nnet3_decoding_config_.beam <<
" max-active=" << nnet3_decoding_config_.max_active <<
" lattice-beam=" << nnet3_decoding_config_.lattice_beam;
KALDI_LOG << "Silence phones " << endpoint_config_.silence_phones;

nnet3_rxfilename_ = model_path_str_ + "/am/final.mdl";
hclg_fst_rxfilename_ = model_path_str_ + "/graph/HCLG.fst";
Expand All @@ -194,6 +189,11 @@ void Model::ReadDataFiles()
{
struct stat buffer;

KALDI_LOG << "Decoding params beam=" << nnet3_decoding_config_.beam <<
" max-active=" << nnet3_decoding_config_.max_active <<
" lattice-beam=" << nnet3_decoding_config_.lattice_beam;
KALDI_LOG << "Silence phones " << endpoint_config_.silence_phones;

feature_info_.feature_type = "mfcc";
ReadConfigFromFile(mfcc_conf_rxfilename_, &feature_info_.mfcc_opts);
feature_info_.mfcc_opts.frame_opts.allow_downsample = true; // It is safe to downsample
Expand Down

0 comments on commit 9d26014

Please sign in to comment.