Re-implement LM rescore for online transducer (#1231)
Co-authored-by: Martins Kronis <martins.kuznecovs@tilde.lv>
This commit is contained in:
@@ -21,13 +21,16 @@ class OnlineTransducerModifiedBeamSearchDecoder
|
||||
OnlineTransducerModifiedBeamSearchDecoder(OnlineTransducerModel *model,
|
||||
OnlineLM *lm,
|
||||
int32_t max_active_paths,
|
||||
float lm_scale, int32_t unk_id,
|
||||
float lm_scale,
|
||||
bool shallow_fusion,
|
||||
int32_t unk_id,
|
||||
float blank_penalty,
|
||||
float temperature_scale)
|
||||
: model_(model),
|
||||
lm_(lm),
|
||||
max_active_paths_(max_active_paths),
|
||||
lm_scale_(lm_scale),
|
||||
shallow_fusion_(shallow_fusion),
|
||||
unk_id_(unk_id),
|
||||
blank_penalty_(blank_penalty),
|
||||
temperature_scale_(temperature_scale) {}
|
||||
@@ -50,6 +53,7 @@ class OnlineTransducerModifiedBeamSearchDecoder
|
||||
|
||||
int32_t max_active_paths_;
|
||||
float lm_scale_; // used only when lm_ is not nullptr
|
||||
bool shallow_fusion_; // used only when lm_ is not nullptr
|
||||
int32_t unk_id_;
|
||||
float blank_penalty_;
|
||||
float temperature_scale_;
|
||||
|
||||
Reference in New Issue
Block a user