From 33d3d2084403fd34b79c835d2f2fe04f6cd8f738 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期三, 13 九月 2023 09:33:54 +0800
Subject: [PATCH] Merge branch 'main' of github.com:alibaba-damo-academy/FunASR add

---
 funasr/runtime/websocket/funasr-wss-server-2pass.cpp |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/funasr/runtime/websocket/funasr-wss-server-2pass.cpp b/funasr/runtime/websocket/funasr-wss-server-2pass.cpp
index 99497dc..bd52f36 100644
--- a/funasr/runtime/websocket/funasr-wss-server-2pass.cpp
+++ b/funasr/runtime/websocket/funasr-wss-server-2pass.cpp
@@ -32,9 +32,9 @@
         "/workspace/models", "string");
     TCLAP::ValueArg<std::string> offline_model_dir(
         "", OFFLINE_MODEL_DIR,
-        "default: /workspace/models/offline_asr, the asr model path, which "
+        "default: damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx, the asr model path, which "
         "contains model_quant.onnx, config.yaml, am.mvn",
-        false, "/workspace/models/offline_asr", "string");
+        false, "damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx", "string");
     TCLAP::ValueArg<std::string> online_model_dir(
         "", ONLINE_MODEL_DIR,
         "default: damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx, the asr model path, which "
@@ -57,9 +57,9 @@
         false, "true", "string");
     TCLAP::ValueArg<std::string> vad_dir(
         "", VAD_DIR,
-        "default: /workspace/models/vad, the vad model path, which contains "
+        "default: damo/speech_fsmn_vad_zh-cn-16k-common-onnx, the vad model path, which contains "
         "model_quant.onnx, vad.yaml, vad.mvn",
-        false, "/workspace/models/vad", "string");
+        false, "damo/speech_fsmn_vad_zh-cn-16k-common-onnx", "string");
     TCLAP::ValueArg<std::string> vad_revision(
         "", "vad-revision", "VAD model revision", false, "v1.2.0", "string");
     TCLAP::ValueArg<std::string> vad_quant(
@@ -69,9 +69,9 @@
         false, "true", "string");
     TCLAP::ValueArg<std::string> punc_dir(
         "", PUNC_DIR,
-        "default: /workspace/models/punc, the punc model path, which contains "
+        "default: damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx, the punc model path, which contains "
         "model_quant.onnx, punc.yaml",
-        false, "/workspace/models/punc", "string");
+        false, "damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx", "string");
     TCLAP::ValueArg<std::string> punc_revision(
         "", "punc-revision", "PUNC model revision", false, "v1.0.2", "string");
     TCLAP::ValueArg<std::string> punc_quant(
@@ -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