feat: addition of blank_penalty config in online_recognizer (#1232)

This commit is contained in:
Parth Khiera
2024-08-08 06:40:17 +05:30
committed by GitHub
parent 8a5f5c1999
commit ba4cb6169f
3 changed files with 8 additions and 0 deletions

View File

@@ -105,6 +105,8 @@ SherpaOnnxOnlineRecognizer *SherpaOnnxCreateOnlineRecognizer(
recognizer_config.hotwords_score =
SHERPA_ONNX_OR(config->hotwords_score, 1.5);
recognizer_config.blank_penalty = SHERPA_ONNX_OR(config->blank_penalty, 0.0);
recognizer_config.ctc_fst_decoder_config.graph =
SHERPA_ONNX_OR(config->ctc_fst_decoder_config.graph, "");
recognizer_config.ctc_fst_decoder_config.max_active =

View File

@@ -142,6 +142,7 @@ SHERPA_ONNX_API typedef struct SherpaOnnxOnlineRecognizerConfig {
/// Bonus score for each token in hotwords.
float hotwords_score;
float blank_penalty;
SherpaOnnxOnlineCtcFstDecoderConfig ctc_fst_decoder_config;
const char *rule_fsts;