From e25679caf3f0226d94bee3af6f693cbaf09cf0cf Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期三, 21 六月 2023 16:38:41 +0800
Subject: [PATCH] update funasr-wss-server
---
funasr/runtime/websocket/funasr-wss-client.cpp | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/funasr/runtime/websocket/funasr-wss-client.cpp b/funasr/runtime/websocket/funasr-wss-client.cpp
index 4a3c751..01dcf91 100644
--- a/funasr/runtime/websocket/funasr-wss-client.cpp
+++ b/funasr/runtime/websocket/funasr-wss-client.cpp
@@ -5,14 +5,14 @@
/* 2022-2023 by zhaomingwork */
// client for websocket, support multiple threads
-// ./funasr-ws-client --server-ip <string>
+// ./funasr-wss-client --server-ip <string>
// --port <string>
// --wav-path <string>
// [--thread-num <int>]
// [--is-ssl <int>] [--]
// [--version] [-h]
// example:
-// ./funasr-ws-client --server-ip 127.0.0.1 --port 8889 --wav-path test.wav --thread-num 1 --is-ssl 0
+// ./funasr-wss-client --server-ip 127.0.0.1 --port 10095 --wav-path test.wav --thread-num 1 --is-ssl 1
#define ASIO_STANDALONE 1
#include <websocketpp/client.hpp>
@@ -91,7 +91,6 @@
using websocketpp::lib::placeholders::_1;
m_client.set_open_handler(bind(&WebsocketClient::on_open, this, _1));
m_client.set_close_handler(bind(&WebsocketClient::on_close, this, _1));
- // m_client.set_close_handler(bind(&WebsocketClient::on_close, this, _1));
m_client.set_message_handler(
[this](websocketpp::connection_hdl hdl, message_ptr msg) {
@@ -218,7 +217,7 @@
}
}
if (wait) {
- LOG(INFO) << "wait.." << m_open;
+ // LOG(INFO) << "wait.." << m_open;
WaitABit();
continue;
}
@@ -278,13 +277,14 @@
};
int main(int argc, char* argv[]) {
+
google::InitGoogleLogging(argv[0]);
FLAGS_logtostderr = true;
- TCLAP::CmdLine cmd("funasr-ws-client", ' ', "1.0");
+ TCLAP::CmdLine cmd("funasr-wss-client", ' ', "1.0");
TCLAP::ValueArg<std::string> server_ip_("", "server-ip", "server-ip", true,
"127.0.0.1", "string");
- TCLAP::ValueArg<std::string> port_("", "port", "port", true, "8889", "string");
+ TCLAP::ValueArg<std::string> port_("", "port", "port", true, "10095", "string");
TCLAP::ValueArg<std::string> wav_path_("", "wav-path",
"the input could be: wav_path, e.g.: asr_example.wav; pcm_path, e.g.: asr_example.pcm; wav.scp, kaldi style wav list (wav_id \t wav_path)",
true, "", "string");
@@ -292,7 +292,7 @@
false, 1, "int");
TCLAP::ValueArg<int> is_ssl_(
"", "is-ssl", "is-ssl is 1 means use wss connection, or use ws connection",
- false, 0, "int");
+ false, 1, "int");
cmd.add(server_ip_);
cmd.add(port_);
--
Gitblit v1.9.1