Reduce model initialization time for offline speech recognition (#213)

This commit is contained in:
Fangjun Kuang
2023-07-14 18:07:27 +08:00
committed by GitHub
parent 0abd7ce881
commit f3206c49dc
10 changed files with 109 additions and 36 deletions

View File

@@ -387,6 +387,7 @@ void CNonStreamingSpeechRecognitionDlg::InitParaformer() {
config_.model_config.tokens = tokens.c_str();
config_.model_config.num_threads = 1;
config_.model_config.debug = 1;
config_.model_config.model_type = "paraformer";
config_.decoding_method = "greedy_search";
config_.max_active_paths = 4;
@@ -447,6 +448,7 @@ void CNonStreamingSpeechRecognitionDlg::InitRecognizer() {
config_.model_config.tokens = tokens.c_str();
config_.model_config.num_threads = 1;
config_.model_config.debug = 0;
config_.model_config.model_type = "transducer";
config_.decoding_method = "greedy_search";
config_.max_active_paths = 4;