From ef07c0d48faa0c19d4ac35f23832069c1bfe04bf Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期一, 04 十二月 2023 11:15:05 +0800
Subject: [PATCH] update model-revision by model name
---
runtime/websocket/bin/funasr-wss-server-2pass.cpp | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/runtime/websocket/bin/funasr-wss-server-2pass.cpp b/runtime/websocket/bin/funasr-wss-server-2pass.cpp
index 258d537..89fe16b 100644
--- a/runtime/websocket/bin/funasr-wss-server-2pass.cpp
+++ b/runtime/websocket/bin/funasr-wss-server-2pass.cpp
@@ -28,8 +28,11 @@
try {
google::InitGoogleLogging(argv[0]);
FLAGS_logtostderr = true;
-
- TCLAP::CmdLine cmd("funasr-wss-server", ' ', "1.0");
+ std::string tpass_version = "";
+#ifdef _WIN32
+ tpass_version = "0.1.0";
+#endif
+ TCLAP::CmdLine cmd("funasr-wss-server", ' ', tpass_version);
TCLAP::ValueArg<std::string> download_model_dir(
"", "download-model-dir",
"Download model from Modelscope to download_model_dir", false,
@@ -96,11 +99,11 @@
"0.0.0.0", "string");
TCLAP::ValueArg<int> port("", "port", "port", false, 10095, "int");
TCLAP::ValueArg<int> io_thread_num("", "io-thread-num", "io thread num",
- false, 8, "int");
+ false, 2, "int");
TCLAP::ValueArg<int> decoder_thread_num(
"", "decoder-thread-num", "decoder thread num", false, 8, "int");
TCLAP::ValueArg<int> model_thread_num("", "model-thread-num",
- "model thread num", false, 4, "int");
+ "model thread num", false, 2, "int");
TCLAP::ValueArg<std::string> certfile(
"", "certfile",
@@ -439,7 +442,7 @@
funasr::ExtractHws(hotword_path, hws_map_);
bool is_ssl = false;
- if (!s_certfile.empty()) {
+ if (!s_certfile.empty() && access(s_certfile.c_str(), F_OK) == 0) {
is_ssl = true;
}
--
Gitblit v1.9.1