mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
update funasr-wss-client.cpp
This commit is contained in:
parent
82495412f2
commit
16cfab0ae5
@ -20,6 +20,7 @@
|
|||||||
#include <websocketpp/config/asio_client.hpp>
|
#include <websocketpp/config/asio_client.hpp>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
#include <thread>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
@ -106,7 +107,7 @@ class WebsocketClient {
|
|||||||
switch (msg->get_opcode()) {
|
switch (msg->get_opcode()) {
|
||||||
case websocketpp::frame::opcode::text:
|
case websocketpp::frame::opcode::text:
|
||||||
total_num=total_num+1;
|
total_num=total_num+1;
|
||||||
LOG(INFO)<<total_num<<",on_message = " << payload;
|
LOG(INFO)<< "Thread: " << this_thread::get_id() <<",on_message = " << payload;
|
||||||
if((total_num+1)==wav_index)
|
if((total_num+1)==wav_index)
|
||||||
{
|
{
|
||||||
websocketpp::lib::error_code ec;
|
websocketpp::lib::error_code ec;
|
||||||
@ -375,4 +376,4 @@ int main(int argc, char* argv[]) {
|
|||||||
for (auto& t : client_threads) {
|
for (auto& t : client_threads) {
|
||||||
t.join();
|
t.join();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user