Re-implement LM rescore for online transducer (#1231)
Co-authored-by: Martins Kronis <martins.kuznecovs@tilde.lv>
This commit is contained in:
@@ -18,15 +18,18 @@ struct OnlineLMConfig {
|
||||
float scale = 0.5;
|
||||
int32_t lm_num_threads = 1;
|
||||
std::string lm_provider = "cpu";
|
||||
// enable shallow fusion
|
||||
bool shallow_fusion = true;
|
||||
|
||||
OnlineLMConfig() = default;
|
||||
|
||||
OnlineLMConfig(const std::string &model, float scale, int32_t lm_num_threads,
|
||||
const std::string &lm_provider)
|
||||
const std::string &lm_provider, bool shallow_fusion)
|
||||
: model(model),
|
||||
scale(scale),
|
||||
lm_num_threads(lm_num_threads),
|
||||
lm_provider(lm_provider) {}
|
||||
lm_provider(lm_provider),
|
||||
shallow_fusion(shallow_fusion) {}
|
||||
|
||||
void Register(ParseOptions *po);
|
||||
bool Validate() const;
|
||||
|
||||
Reference in New Issue
Block a user