Reduce model initialization time for online speech recognition (#215)
* Reduce model initialization time for online speech recognition * Fixed Styling --------- Co-authored-by: w11wo <wilsowong961@gmail.com>
This commit is contained in:
@@ -50,6 +50,8 @@ SherpaOnnxOnlineRecognizer *CreateOnlineRecognizer(
|
||||
SHERPA_ONNX_OR(config->model_config.num_threads, 1);
|
||||
recognizer_config.model_config.provider =
|
||||
SHERPA_ONNX_OR(config->model_config.provider, "cpu");
|
||||
recognizer_config.model_config.model_type =
|
||||
SHERPA_ONNX_OR(config->model_config.model_type, "");
|
||||
recognizer_config.model_config.debug =
|
||||
SHERPA_ONNX_OR(config->model_config.debug, 0);
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ SHERPA_ONNX_API typedef struct SherpaOnnxOnlineTransducerModelConfig {
|
||||
const char *tokens;
|
||||
int32_t num_threads;
|
||||
const char *provider;
|
||||
const char *model_type;
|
||||
int32_t debug; // true to print debug information of the model
|
||||
} SherpaOnnxOnlineTransducerModelConfig;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user