OnlineGmmDecodingAdaptationPolicyConfig Struct Reference

This configuration class controls when to re-estimate the basis-fMLLR during online decoding. More...

#include <online-gmm-decoding.h>

Collaboration diagram for OnlineGmmDecodingAdaptationPolicyConfig:

Public Member Functions

 OnlineGmmDecodingAdaptationPolicyConfig ()
 
void Register (OptionsItf *opts)
 
void Check () const
 Check that configuration values make sense. More...
 
bool DoAdapt (BaseFloat chunk_begin_secs, BaseFloat chunk_end_secs, bool is_first_utterance) const
 This function returns true if we are scheduled to re-estimate fMLLR somewhere in the interval [ chunk_begin_secs, chunk_end_secs ). More...
 

Public Attributes

BaseFloat adaptation_first_utt_delay
 
BaseFloat adaptation_first_utt_ratio
 
BaseFloat adaptation_delay
 
BaseFloat adaptation_ratio
 

Detailed Description

This configuration class controls when to re-estimate the basis-fMLLR during online decoding.

The basic model is to re-estimate it on a certain time t (e.g. after 1 second) and then at a set of times forming a geometric series, e.g. 1.5, 1.5^2, etc. We specify different configurations for the first utterance of a speaker (which requires more frequent adaptation), and for subsequent utterances. We also re-estimate fMLLR at the end of every utterance, but this is done directly from the calling code, not by the class SingleUtteranceGmmDecoder.

Definition at line 56 of file online-gmm-decoding.h.

Constructor & Destructor Documentation

◆ OnlineGmmDecodingAdaptationPolicyConfig()

Member Function Documentation

◆ Check()

void Check ( ) const

◆ DoAdapt()

bool DoAdapt ( BaseFloat  chunk_begin_secs,
BaseFloat  chunk_end_secs,
bool  is_first_utterance 
) const

This function returns true if we are scheduled to re-estimate fMLLR somewhere in the interval [ chunk_begin_secs, chunk_end_secs ).

Definition at line 423 of file online-gmm-decoding.cc.

Referenced by SingleUtteranceGmmDecoder::AdvanceDecoding(), and OnlineGmmDecodingAdaptationPolicyConfig::Register().

426  {
427  Check();
428  if (is_first_utterance) {
429  // We aim to return true if a member of the sequence
430  // ( adaptation_first_utt_delay * adaptation_first_utt_ratio^n )
431  // for n = 0, 1, 2, ...
432  // is in the range [ chunk_begin_secs, chunk_end_secs ).
434  while (delay < chunk_begin_secs)
436  return (delay < chunk_end_secs);
437  } else {
438  // as above, but remove "first_utt".
439  BaseFloat delay = adaptation_delay;
440  while (delay < chunk_begin_secs)
441  delay *= adaptation_ratio;
442  return (delay < chunk_end_secs);
443  }
444 }
void Check() const
Check that configuration values make sense.
float BaseFloat
Definition: kaldi-types.h:29

◆ Register()

void Register ( OptionsItf opts)
inline

Definition at line 67 of file online-gmm-decoding.h.

References OnlineGmmDecodingAdaptationPolicyConfig::Check(), OnlineGmmDecodingAdaptationPolicyConfig::DoAdapt(), and OptionsItf::Register().

Referenced by OnlineGmmDecodingConfig::Register().

67  {
68  opts->Register("adaptation-first-utt-delay", &adaptation_first_utt_delay,
69  "Delay before first basis-fMLLR adaptation for first utterance "
70  "of each speaker");
71  opts->Register("adaptation-first-utt-ratio", &adaptation_first_utt_ratio,
72  "Ratio that controls frequency of fMLLR adaptation for first "
73  "utterance of each speaker");
74  opts->Register("adaptation-delay", &adaptation_delay,
75  "Delay before first basis-fMLLR adaptation for not-first "
76  "utterances of each speaker");
77  opts->Register("adaptation-ratio", &adaptation_ratio,
78  "Ratio that controls frequency of fMLLR adaptation for "
79  "not-first utterances of each speaker");
80  }

Member Data Documentation

◆ adaptation_delay

BaseFloat adaptation_delay

Definition at line 59 of file online-gmm-decoding.h.

◆ adaptation_first_utt_delay

BaseFloat adaptation_first_utt_delay

Definition at line 57 of file online-gmm-decoding.h.

◆ adaptation_first_utt_ratio

BaseFloat adaptation_first_utt_ratio

Definition at line 58 of file online-gmm-decoding.h.

◆ adaptation_ratio

BaseFloat adaptation_ratio

Definition at line 60 of file online-gmm-decoding.h.


The documentation for this struct was generated from the following files: