Inverse text normalization API for other programming languages (#1019)
This commit is contained in:
@@ -388,6 +388,9 @@ SherpaOnnxOfflineRecognizer *CreateOfflineRecognizer(
|
||||
recognizer_config.hotwords_score =
|
||||
SHERPA_ONNX_OR(config->hotwords_score, 1.5);
|
||||
|
||||
recognizer_config.rule_fsts = SHERPA_ONNX_OR(config->rule_fsts, "");
|
||||
recognizer_config.rule_fars = SHERPA_ONNX_OR(config->rule_fars, "");
|
||||
|
||||
if (config->model_config.debug) {
|
||||
SHERPA_ONNX_LOGE("%s", recognizer_config.ToString().c_str());
|
||||
}
|
||||
|
||||
@@ -411,6 +411,8 @@ SHERPA_ONNX_API typedef struct SherpaOnnxOfflineRecognizerConfig {
|
||||
|
||||
/// Bonus score for each token in hotwords.
|
||||
float hotwords_score;
|
||||
const char *rule_fsts;
|
||||
const char *rule_fars;
|
||||
} SherpaOnnxOfflineRecognizerConfig;
|
||||
|
||||
SHERPA_ONNX_API typedef struct SherpaOnnxOfflineRecognizer
|
||||
|
||||
Reference in New Issue
Block a user