From c2e4e3c2e9be855277d9f4fa9cd0544892ff829a Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期三, 30 八月 2023 09:57:30 +0800
Subject: [PATCH] Merge branch 'main' of github.com:alibaba-damo-academy/FunASR add
---
funasr/runtime/websocket/funasr-wss-server-2pass.cpp | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/funasr/runtime/websocket/funasr-wss-server-2pass.cpp b/funasr/runtime/websocket/funasr-wss-server-2pass.cpp
index 22b4587..bd52f36 100644
--- a/funasr/runtime/websocket/funasr-wss-server-2pass.cpp
+++ b/funasr/runtime/websocket/funasr-wss-server-2pass.cpp
@@ -154,7 +154,7 @@
std::string python_cmd =
"python -m funasr.utils.runtime_sdk_download_tool --type onnx --quantize True ";
- if (vad_dir.isSet() && !s_vad_path.empty()) {
+ if (!s_vad_path.empty()) {
std::string python_cmd_vad;
std::string down_vad_path;
std::string down_vad_model;
@@ -200,7 +200,7 @@
LOG(INFO) << "VAD model is not set, use default.";
}
- if (offline_model_dir.isSet() && !s_offline_asr_path.empty()) {
+ if (!s_offline_asr_path.empty()) {
std::string python_cmd_asr;
std::string down_asr_path;
std::string down_asr_model;
@@ -288,7 +288,7 @@
LOG(INFO) << "ASR online model is not set, use default.";
}
- if (punc_dir.isSet() && !s_punc_path.empty()) {
+ if (!s_punc_path.empty()) {
std::string python_cmd_punc;
std::string down_punc_path;
std::string down_punc_model;
@@ -368,6 +368,7 @@
server server_; // server for websocket
wss_server wss_server_;
if (is_ssl) {
+ LOG(INFO)<< "SSL is opened!";
wss_server_.init_asio(&io_server); // init asio
wss_server_.set_reuse_addr(
true); // reuse address as we create multiple threads
@@ -380,6 +381,7 @@
websocket_srv.initAsr(model_path, s_model_thread_num); // init asr model
} else {
+ LOG(INFO)<< "SSL is closed!";
server_.init_asio(&io_server); // init asio
server_.set_reuse_addr(
true); // reuse address as we create multiple threads
--
Gitblit v1.9.1