mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
set sleep to 10ms
This commit is contained in:
parent
259a1c7028
commit
8b6aaac4ae
@ -108,16 +108,16 @@ class WebsocketClient {
|
|||||||
case websocketpp::frame::opcode::text:
|
case websocketpp::frame::opcode::text:
|
||||||
total_num=total_num+1;
|
total_num=total_num+1;
|
||||||
LOG(INFO)<< "Thread: " << this_thread::get_id() <<",on_message = " << payload;
|
LOG(INFO)<< "Thread: " << this_thread::get_id() <<",on_message = " << payload;
|
||||||
// LOG(INFO) << "total_num=" << total_num << " wav_index=" <<wav_index;
|
LOG(INFO) << "total_num=" << total_num << " wav_index=" <<wav_index;
|
||||||
// if((total_num+1)==wav_index)
|
if((total_num+1)==wav_index)
|
||||||
// {
|
{
|
||||||
// LOG(INFO) << "close client";
|
LOG(INFO) << "close client";
|
||||||
// websocketpp::lib::error_code ec;
|
websocketpp::lib::error_code ec;
|
||||||
// m_client.close(m_hdl, websocketpp::close::status::going_away, "", ec);
|
m_client.close(m_hdl, websocketpp::close::status::going_away, "", ec);
|
||||||
// if (ec){
|
if (ec){
|
||||||
// LOG(ERROR)<< "Error closing connection " << ec.message();
|
LOG(ERROR)<< "Error closing connection " << ec.message();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,7 +321,7 @@ class WebsocketClient {
|
|||||||
jsonresult["is_speaking"] = false;
|
jsonresult["is_speaking"] = false;
|
||||||
m_client.send(m_hdl, jsonresult.dump(), websocketpp::frame::opcode::text,
|
m_client.send(m_hdl, jsonresult.dump(), websocketpp::frame::opcode::text,
|
||||||
ec);
|
ec);
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||||
}
|
}
|
||||||
websocketpp::client<T> m_client;
|
websocketpp::client<T> m_client;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user