Skip to content

Commit

Permalink
formated long lines with clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
xiao committed Sep 11, 2024
1 parent e5dd86e commit 1254023
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions sherpa-onnx/c-api/c-api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ SherpaOnnxOnlineRecognizer *SherpaOnnxCreateOnlineRecognizer(
SHERPA_ONNX_OR(config->model_config.tokens, "");
if (config->model_config.tokens_buf &&
config->model_config.tokens_buf_size > 0) {
recognizer_config.model_config.tokens_buf = std::string(config->model_config.tokens_buf,
config->model_config.tokens_buf_size);
recognizer_config.model_config.tokens_buf = std::string(
config->model_config.tokens_buf, config->model_config.tokens_buf_size);
} else {
recognizer_config.model_config.tokens_buf = "";
}
Expand Down Expand Up @@ -128,10 +128,9 @@ SherpaOnnxOnlineRecognizer *SherpaOnnxCreateOnlineRecognizer(
recognizer_config.hotwords_file = SHERPA_ONNX_OR(config->hotwords_file, "");
recognizer_config.hotwords_score =
SHERPA_ONNX_OR(config->hotwords_score, 1.5);
if (config->hotwords_buf &&
config->hotwords_buf_size > 0) {
recognizer_config.hotwords_buf = std::string(config->hotwords_buf,
config->hotwords_buf_size);
if (config->hotwords_buf && config->hotwords_buf_size > 0) {
recognizer_config.hotwords_buf =
std::string(config->hotwords_buf, config->hotwords_buf_size);
} else {
recognizer_config.hotwords_buf = "";
}
Expand Down

0 comments on commit 1254023

Please sign in to comment.