Fix CI (#964)
This commit is contained in:
@@ -126,6 +126,8 @@ static SherpaOnnxOfflineModelConfig GetOfflineModelConfig(Napi::Object obj) {
|
||||
|
||||
SHERPA_ONNX_ASSIGN_ATTR_STR(provider, provider);
|
||||
SHERPA_ONNX_ASSIGN_ATTR_STR(model_type, modelType);
|
||||
SHERPA_ONNX_ASSIGN_ATTR_STR(modeling_unit, modelingUnit);
|
||||
SHERPA_ONNX_ASSIGN_ATTR_STR(bpe_vocab, bpeVocab);
|
||||
|
||||
return c;
|
||||
}
|
||||
@@ -232,6 +234,14 @@ CreateOfflineRecognizerWrapper(const Napi::CallbackInfo &info) {
|
||||
delete[] c.model_config.model_type;
|
||||
}
|
||||
|
||||
if (c.model_config.modeling_unit) {
|
||||
delete[] c.model_config.modeling_unit;
|
||||
}
|
||||
|
||||
if (c.model_config.bpe_vocab) {
|
||||
delete[] c.model_config.bpe_vocab;
|
||||
}
|
||||
|
||||
if (c.lm_config.model) {
|
||||
delete[] c.lm_config.model;
|
||||
}
|
||||
|
||||
@@ -118,6 +118,8 @@ SherpaOnnxOnlineModelConfig GetOnlineModelConfig(Napi::Object obj) {
|
||||
}
|
||||
|
||||
SHERPA_ONNX_ASSIGN_ATTR_STR(model_type, modelType);
|
||||
SHERPA_ONNX_ASSIGN_ATTR_STR(modeling_unit, modelingUnit);
|
||||
SHERPA_ONNX_ASSIGN_ATTR_STR(bpe_vocab, bpeVocab);
|
||||
|
||||
return c;
|
||||
}
|
||||
@@ -228,6 +230,14 @@ static Napi::External<SherpaOnnxOnlineRecognizer> CreateOnlineRecognizerWrapper(
|
||||
delete[] c.model_config.model_type;
|
||||
}
|
||||
|
||||
if (c.model_config.modeling_unit) {
|
||||
delete[] c.model_config.modeling_unit;
|
||||
}
|
||||
|
||||
if (c.model_config.bpe_vocab) {
|
||||
delete[] c.model_config.bpe_vocab;
|
||||
}
|
||||
|
||||
if (c.decoding_method) {
|
||||
delete[] c.decoding_method;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user