Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
Python asraudiochineseemotion-recognitionfunasrmcp-servermultilingual-asropenai-compatible-apiparaformerpunctuationpytorchreal-time-asrspeaker-diarizationspeech-recognitionspeech-to-textstreaming-asrtranscriptionvllmvoice-activity-detectionwhisper-alternative
adapted pcm to 8k
雾聪de87e1d180d2
diff --git a/runtime/onnxruntime/bin/funasr-onnx-2pass-rtf.cpp b/runtime/onnxruntime/bin/funasr-onnx-2pass-rtf.cppindex c55c888d4..e591b322d 100644--- a/runtime/onnxruntime/bin/funasr-onnx-2pass-rtf.cpp+++ b/runtime/onnxruntime/bin/funasr-onnx-2pass-rtf.cpp@@ -43,7 +43,7 @@ void GetValue(TCLAP::ValueArg<std::string>& value_arg, string key, std::map<std:LOG(INFO)<< key << " : " << value_arg.getValue();}-void runReg(FUNASR_HANDLE tpass_handle, std::vector<int> chunk_size, vector<string> wav_list, vector<string> wav_ids,+void runReg(FUNASR_HANDLE tpass_handle, std::vector<int> chunk_size, vector<string> wav_list, vector<string> wav_ids, int audio_fs,float* total_length, long* total_time, int core_id, ASR_TYPE asr_mode_, string nn_hotwords_) {struct timeval start, end;@@ -59,7 +59,7 @@ void runReg(FUNASR_HANDLE tpass_handle, std::vector<int> chunk_size, vector<stri// warm upfor (size_t i = 0; i < 2; i++){- int32_t sampling_rate_ = 16000;+ int32_t sampling_rate_ = audio_fs;funasr::Audio audio(1);if(is_target_file(wav_list[0].c_str(), "wav")){if(!audio.LoadWav2Char(wav_list[0].c_str(), &sampling_rate_)){@@ -104,7 +104,7 @@ void runReg(FUNASR_HANDLE tpass_handle, std::vector<int> chunk_size, vector<striif (i >= wav_list.size()) {break;}- int32_t sampling_rate_ = 16000;+ int32_t sampling_rate_ = audio_fs;funasr::Audio audio(1);if(is_target_file(wav_list[i].c_str(), "wav")){if(!audio.LoadWav2Char(wav_list[i].c_str(), &sampling_rate_)){@@ -220,6 +220,7 @@ int main(int argc, char** argv)TCLAP::ValueArg<std::int32_t> onnx_thread("", "model-thread-num", "onnxruntime SetIntraOpNumThreads", false, 1, "int32_t");TCLAP::ValueArg<std::int32_t> thread_num_("", THREAD_NUM, "multi-thread num for rtf", false, 1, "int32_t");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");+ TCLAP::ValueArg<std::int32_t> audio_fs("", AUDIO_FS, "the sample rate of audio", false, 16000, "int32_t");TCLAP::ValueArg<std::string> hotword("", HOTWORD, "the hotword file, one hotword perline, Format: Hotword Weight (could be: 阿里巴巴 20)", false, "", "string");cmd.add(offline_model_dir);@@ -231,6 +232,7 @@ int main(int argc, char** argv)cmd.add(punc_quant);cmd.add(itn_dir);cmd.add(wav_path);+ cmd.add(audio_fs);cmd.add(asr_mode);cmd.add(onnx_thread);cmd.add(thread_num_);@@ -319,7 +321,7 @@ int main(int argc, char** argv)int rtf_threds = thread_num_.getValue();for (int i = 0; i < rtf_threds; i++){- threads.emplace_back(thread(runReg, tpass_hanlde, chunk_size, wav_list, wav_ids, &total_length, &total_time, i, (ASR_TYPE)asr_mode_, nn_hotwords_));+ threads.emplace_back(thread(runReg, tpass_hanlde, chunk_size, wav_list, wav_ids, audio_fs.getValue(), &total_length, &total_time, i, (ASR_TYPE)asr_mode_, nn_hotwords_));}for (auto& thread : threads)diff --git a/runtime/onnxruntime/bin/funasr-onnx-2pass.cpp b/runtime/onnxruntime/bin/funasr-onnx-2pass.cppindex 5af0b414a..b21092771 100644--- a/runtime/onnxruntime/bin/funasr-onnx-2pass.cpp+++ b/runtime/onnxruntime/bin/funasr-onnx-2pass.cpp@@ -55,6 +55,7 @@ int main(int argc, char** argv)TCLAP::ValueArg<std::int32_t> onnx_thread("", "model-thread-num", "onnxruntime SetIntraOpNumThreads", false, 1, "int32_t");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");+ TCLAP::ValueArg<std::int32_t> audio_fs("", AUDIO_FS, "the sample rate of audio", false, 16000, "int32_t");TCLAP::ValueArg<std::string> hotword("", HOTWORD, "the hotword file, one hotword perline, Format: Hotword Weight (could be: 阿里巴巴 20)", false, "", "string");cmd.add(offline_model_dir);@@ -66,6 +67,7 @@ int main(int argc, char** argv)cmd.add(punc_quant);cmd.add(itn_dir);cmd.add(wav_path);+ cmd.add(audio_fs);cmd.add(asr_mode);cmd.add(onnx_thread);cmd.add(hotword);@@ -154,7 +156,7 @@ int main(int argc, char** argv)auto& wav_file = wav_list[i];auto& wav_id = wav_ids[i];- int32_t sampling_rate_ = 16000;+ int32_t sampling_rate_ = audio_fs.getValue();funasr::Audio audio(1);if(is_target_file(wav_file.c_str(), "wav")){if(!audio.LoadWav2Char(wav_file.c_str(), &sampling_rate_)){diff --git a/runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cpp b/runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cppindex b248bca58..39928b4cd 100644--- a/runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cpp+++ b/runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cpp@@ -29,7 +29,7 @@ using namespace std;std::atomic<int> wav_index(0);std::mutex mtx;-void runReg(FUNASR_HANDLE asr_handle, vector<string> wav_list, vector<string> wav_ids,+void runReg(FUNASR_HANDLE asr_handle, vector<string> wav_list, vector<string> wav_ids, int audio_fs,float* total_length, long* total_time, int core_id, float glob_beam = 3.0f, float lat_beam = 3.0f, float am_sc = 10.0f,int fst_inc_wts = 20, string hotword_path = "") {@@ -55,7 +55,7 @@ void runReg(FUNASR_HANDLE asr_handle, vector<string> wav_list, vector<string> wafor (size_t i = 0; i < 1; i++){FunOfflineReset(asr_handle, decoder_handle);- FUNASR_RESULT result=FunOfflineInfer(asr_handle, wav_list[0].c_str(), RASR_NONE, NULL, hotwords_embedding, 16000, true, decoder_handle);+ FUNASR_RESULT result=FunOfflineInfer(asr_handle, wav_list[0].c_str(), RASR_NONE, NULL, hotwords_embedding, audio_fs, true, decoder_handle);if(result){FunASRFreeResult(result);}@@ -69,7 +69,7 @@ void runReg(FUNASR_HANDLE asr_handle, vector<string> wav_list, vector<string> wa}gettimeofday(&start, NULL);- FUNASR_RESULT result=FunOfflineInfer(asr_handle, wav_list[i].c_str(), RASR_NONE, NULL, hotwords_embedding, 16000, true, decoder_handle);+ FUNASR_RESULT result=FunOfflineInfer(asr_handle, wav_list[i].c_str(), RASR_NONE, NULL, hotwords_embedding, audio_fs, true, decoder_handle);gettimeofday(&end, NULL);seconds = (end.tv_sec - start.tv_sec);@@ -138,6 +138,7 @@ int main(int argc, char *argv[])TCLAP::ValueArg<std::string> itn_dir("", ITN_DIR, "the itn model(fst) path, which contains zh_itn_tagger.fst and zh_itn_verbalizer.fst", false, "", "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");+ TCLAP::ValueArg<std::int32_t> audio_fs("", AUDIO_FS, "the sample rate of audio", false, 16000, "int32_t");TCLAP::ValueArg<std::int32_t> thread_num("", THREAD_NUM, "multi-thread num for rtf", true, 0, "int32_t");TCLAP::ValueArg<std::string> hotword("", HOTWORD, "the hotword file, one hotword perline, Format: Hotword Weight (could be: 阿里巴巴 20)", false, "", "string");@@ -155,6 +156,7 @@ int main(int argc, char *argv[])cmd.add(hotword);cmd.add(fst_inc_wts);cmd.add(wav_path);+ cmd.add(audio_fs);cmd.add(thread_num);cmd.parse(argc, argv);@@ -234,7 +236,7 @@ int main(int argc, char *argv[])}for (int i = 0; i < rtf_threds; i++){- threads.emplace_back(thread(runReg, asr_handle, wav_list, wav_ids, &total_length, &total_time, i, glob_beam, lat_beam, am_sc, value_bias, hotword_path));+ threads.emplace_back(thread(runReg, asr_handle, wav_list, wav_ids, audio_fs.getValue(), &total_length, &total_time, i, glob_beam, lat_beam, am_sc, value_bias, hotword_path));}for (auto& thread : threads)diff --git a/runtime/onnxruntime/bin/funasr-onnx-offline-vad.cpp b/runtime/onnxruntime/bin/funasr-onnx-offline-vad.cppindex 88c10da75..950530ae8 100644--- a/runtime/onnxruntime/bin/funasr-onnx-offline-vad.cpp+++ b/runtime/onnxruntime/bin/funasr-onnx-offline-vad.cpp@@ -68,10 +68,12 @@ int main(int argc, char *argv[])TCLAP::ValueArg<std::string> quantize("", QUANTIZE, "true (Default), load the model of model.onnx in model_dir. If set true, load the model of model_quant.onnx in model_dir", false, "true", "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");+ TCLAP::ValueArg<std::int32_t> audio_fs("", AUDIO_FS, "the sample rate of audio", false, 16000, "int32_t");cmd.add(model_dir);cmd.add(quantize);cmd.add(wav_path);+ cmd.add(audio_fs);cmd.parse(argc, argv);std::map<std::string, std::string> model_path;@@ -131,7 +133,7 @@ int main(int argc, char *argv[])auto& wav_file = wav_list[i];auto& wav_id = wav_ids[i];gettimeofday(&start, NULL);- FUNASR_RESULT result=FsmnVadInfer(vad_hanlde, wav_file.c_str(), NULL, 16000);+ FUNASR_RESULT result=FsmnVadInfer(vad_hanlde, wav_file.c_str(), NULL, audio_fs.getValue());gettimeofday(&end, NULL);seconds = (end.tv_sec - start.tv_sec);taking_micros += ((seconds * 1000000) + end.tv_usec) - (start.tv_usec);diff --git a/runtime/onnxruntime/bin/funasr-onnx-offline.cpp b/runtime/onnxruntime/bin/funasr-onnx-offline.cppindex 87b57a86d..eb908d851 100644--- a/runtime/onnxruntime/bin/funasr-onnx-offline.cpp+++ b/runtime/onnxruntime/bin/funasr-onnx-offline.cpp@@ -57,6 +57,7 @@ int main(int argc, char** argv)TCLAP::ValueArg<std::int32_t> fst_inc_wts("", FST_INC_WTS, "the fst hotwords incremental bias", false, 20, "int32_t");TCLAP::ValueArg<std::string> itn_dir("", ITN_DIR, "the itn model(fst) path, which contains zh_itn_tagger.fst and zh_itn_verbalizer.fst", false, "", "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");+ TCLAP::ValueArg<std::int32_t> audio_fs("", AUDIO_FS, "the sample rate of audio", false, 16000, "int32_t");TCLAP::ValueArg<std::string> hotword("", HOTWORD, "the hotword file, one hotword perline, Format: Hotword Weight (could be: 阿里巴巴 20)", false, "", "string");cmd.add(model_dir);@@ -72,6 +73,7 @@ int main(int argc, char** argv)cmd.add(am_scale);cmd.add(fst_inc_wts);cmd.add(wav_path);+ cmd.add(audio_fs);cmd.add(hotword);cmd.parse(argc, argv);@@ -157,7 +159,7 @@ int main(int argc, char** argv)auto& wav_file = wav_list[i];auto& wav_id = wav_ids[i];gettimeofday(&start, NULL);- FUNASR_RESULT result=FunOfflineInfer(asr_hanlde, wav_file.c_str(), RASR_NONE, NULL, hotwords_embedding, 16000, true, decoder_handle);+ FUNASR_RESULT result=FunOfflineInfer(asr_hanlde, wav_file.c_str(), RASR_NONE, NULL, hotwords_embedding, audio_fs.getValue(), true, decoder_handle);gettimeofday(&end, NULL);seconds = (end.tv_sec - start.tv_sec);taking_micros += ((seconds * 1000000) + end.tv_usec) - (start.tv_usec);diff --git a/runtime/onnxruntime/bin/funasr-onnx-online-asr.cpp b/runtime/onnxruntime/bin/funasr-onnx-online-asr.cppindex 2d1e3c1cb..a7c01698d 100644--- a/runtime/onnxruntime/bin/funasr-onnx-online-asr.cpp+++ b/runtime/onnxruntime/bin/funasr-onnx-online-asr.cpp@@ -49,10 +49,12 @@ int main(int argc, char *argv[])TCLAP::ValueArg<std::string> quantize("", QUANTIZE, "true (Default), load the model of model.onnx in model_dir. If set true, load the model of model_quant.onnx in model_dir", false, "true", "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");+ TCLAP::ValueArg<std::int32_t> audio_fs("", AUDIO_FS, "the sample rate of audio", false, 16000, "int32_t");cmd.add(model_dir);cmd.add(quantize);cmd.add(wav_path);+ cmd.add(audio_fs);cmd.parse(argc, argv);std::map<std::string, std::string> model_path;@@ -143,7 +145,7 @@ int main(int argc, char *argv[])is_final = false;}gettimeofday(&start, NULL);- FUNASR_RESULT result = FunASRInferBuffer(online_handle, speech_buff+sample_offset, step, RASR_NONE, NULL, is_final, 16000);+ FUNASR_RESULT result = FunASRInferBuffer(online_handle, speech_buff+sample_offset, step, RASR_NONE, NULL, is_final, audio_fs.getValue());gettimeofday(&end, NULL);seconds = (end.tv_sec - start.tv_sec);taking_micros += ((seconds * 1000000) + end.tv_usec) - (start.tv_usec);diff --git a/runtime/onnxruntime/bin/funasr-onnx-online-rtf.cpp b/runtime/onnxruntime/bin/funasr-onnx-online-rtf.cppindex bc3673a50..7b725b9b5 100644--- a/runtime/onnxruntime/bin/funasr-onnx-online-rtf.cpp+++ b/runtime/onnxruntime/bin/funasr-onnx-online-rtf.cpp@@ -38,7 +38,7 @@ bool is_target_file(const std::string& filename, const std::string target) {return (extension == target);}-void runReg(FUNASR_HANDLE asr_handle, vector<string> wav_list, vector<string> wav_ids,+void runReg(FUNASR_HANDLE asr_handle, vector<string> wav_list, vector<string> wav_ids, int audio_fs,float* total_length, long* total_time, int core_id) {struct timeval start, end;@@ -84,7 +84,7 @@ void runReg(FUNASR_HANDLE asr_handle, vector<string> wav_list, vector<string> wa} else {is_final = false;}- FUNASR_RESULT result = FunASRInferBuffer(online_handle, speech_buff+sample_offset, step, RASR_NONE, NULL, is_final, 16000);+ FUNASR_RESULT result = FunASRInferBuffer(online_handle, speech_buff+sample_offset, step, RASR_NONE, NULL, is_final, audio_fs);if (result){FunASRFreeResult(result);@@ -131,7 +131,7 @@ void runReg(FUNASR_HANDLE asr_handle, vector<string> wav_list, vector<string> wais_final = false;}gettimeofday(&start, NULL);- FUNASR_RESULT result = FunASRInferBuffer(online_handle, speech_buff+sample_offset, step, RASR_NONE, NULL, is_final, 16000);+ FUNASR_RESULT result = FunASRInferBuffer(online_handle, speech_buff+sample_offset, step, RASR_NONE, NULL, is_final, audio_fs);gettimeofday(&end, NULL);seconds = (end.tv_sec - start.tv_sec);long taking_micros = ((seconds * 1000000) + end.tv_usec) - (start.tv_usec);@@ -186,6 +186,7 @@ int main(int argc, char *argv[])TCLAP::ValueArg<std::string> punc_quant("", PUNC_QUANT, "true (Default), load the model of model.onnx in punc_dir. If set true, load the model of model_quant.onnx in punc_dir", false, "true", "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");+ TCLAP::ValueArg<std::int32_t> audio_fs("", AUDIO_FS, "the sample rate of audio", false, 16000, "int32_t");TCLAP::ValueArg<std::int32_t> thread_num("", THREAD_NUM, "multi-thread num for rtf", true, 0, "int32_t");cmd.add(model_dir);@@ -195,6 +196,7 @@ int main(int argc, char *argv[])cmd.add(punc_dir);cmd.add(punc_quant);cmd.add(wav_path);+ cmd.add(audio_fs);cmd.add(thread_num);cmd.parse(argc, argv);@@ -260,7 +262,7 @@ int main(int argc, char *argv[])int rtf_threds = thread_num.getValue();for (int i = 0; i < rtf_threds; i++){- threads.emplace_back(thread(runReg, asr_handle, wav_list, wav_ids, &total_length, &total_time, i));+ threads.emplace_back(thread(runReg, asr_handle, wav_list, wav_ids, audio_fs.getValue(), &total_length, &total_time, i));}for (auto& thread : threads)diff --git a/runtime/onnxruntime/bin/funasr-onnx-online-vad.cpp b/runtime/onnxruntime/bin/funasr-onnx-online-vad.cppindex cd79726d5..99d5be613 100644--- a/runtime/onnxruntime/bin/funasr-onnx-online-vad.cpp+++ b/runtime/onnxruntime/bin/funasr-onnx-online-vad.cpp@@ -75,10 +75,12 @@ int main(int argc, char *argv[])TCLAP::ValueArg<std::string> quantize("", QUANTIZE, "false (Default), load the model of model.onnx in model_dir. If set true, load the model of model_quant.onnx in model_dir", false, "true", "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");+ TCLAP::ValueArg<std::int32_t> audio_fs("", AUDIO_FS, "the sample rate of audio", false, 16000, "int32_t");cmd.add(model_dir);cmd.add(quantize);cmd.add(wav_path);+ cmd.add(audio_fs);cmd.parse(argc, argv);std::map<std::string, std::string> model_path;@@ -170,7 +172,7 @@ int main(int argc, char *argv[])is_final = false;}gettimeofday(&start, NULL);- FUNASR_RESULT result = FsmnVadInferBuffer(online_hanlde, speech_buff+sample_offset, step, NULL, is_final, 16000);+ FUNASR_RESULT result = FsmnVadInferBuffer(online_hanlde, speech_buff+sample_offset, step, NULL, is_final, audio_fs.getValue());gettimeofday(&end, NULL);seconds = (end.tv_sec - start.tv_sec);taking_micros += ((seconds * 1000000) + end.tv_usec) - (start.tv_usec);diff --git a/runtime/onnxruntime/include/com-define.h b/runtime/onnxruntime/include/com-define.hindex a2745da6c..9cb1f2c96 100644--- a/runtime/onnxruntime/include/com-define.h+++ b/runtime/onnxruntime/include/com-define.h@@ -34,6 +34,7 @@ namespace funasr {#define THREAD_NUM "thread-num"#define PORT_ID "port-id"#define HOTWORD_SEP " "+#define AUDIO_FS "audio-fs"// #define VAD_MODEL_PATH "vad-model"// #define VAD_CMVN_PATH "vad-cmvn"diff --git a/runtime/onnxruntime/src/audio.cpp b/runtime/onnxruntime/src/audio.cppindex 132f47dca..22d7f3cdb 100644--- a/runtime/onnxruntime/src/audio.cpp+++ b/runtime/onnxruntime/src/audio.cpp@@ -245,7 +245,7 @@ void Audio::WavResample(int32_t sampling_rate, const float *waveform,{LOG(INFO) << "Creating a resampler:\n"<< " in_sample_rate: "<< sampling_rate << "\n"- << " output_sample_rate: " << static_cast<int32_t>(MODEL_SAMPLE_RATE);+ << " output_sample_rate: " << static_cast<int32_t>(dest_sample_rate);float min_freq =std::min<int32_t>(sampling_rate, dest_sample_rate);float lowpass_cutoff = 0.99 * 0.5 * min_freq;diff --git a/runtime/onnxruntime/src/paraformer.cpp b/runtime/onnxruntime/src/paraformer.cppindex 2c78fe5b6..bb15ac723 100644--- a/runtime/onnxruntime/src/paraformer.cpp+++ b/runtime/onnxruntime/src/paraformer.cpp@@ -466,7 +466,7 @@ string Paraformer::Forward(float* din, int len, bool input_finished, const std::int32_t in_feat_dim = fbank_opts_.mel_opts.num_bins;std::vector<std::vector<float>> asr_feats;- FbankKaldi(MODEL_SAMPLE_RATE, din, len, asr_feats);+ FbankKaldi(asr_sample_rate, din, len, asr_feats);if(asr_feats.size() == 0){return "";}diff --git a/runtime/websocket/bin/websocket-server-2pass.cpp b/runtime/websocket/bin/websocket-server-2pass.cppindex 5cfd4619a..499c95087 100644--- a/runtime/websocket/bin/websocket-server-2pass.cpp+++ b/runtime/websocket/bin/websocket-server-2pass.cpp@@ -232,7 +232,7 @@ void WebSocketServer::on_open(websocketpp::connection_hdl hdl) {data_msg->msg["wav_name"] = "wav-default-id";data_msg->msg["mode"] = "2pass";data_msg->msg["itn"] = true;- data_msg->msg["audio_fs"] = 16000;+ data_msg->msg["audio_fs"] = 16000; // default is 16kdata_msg->msg["access_num"] = 0; // the number of access for this object, when it is 0, we can free it saftlydata_msg->msg["is_eof"]=false; // if this connection is closeddata_msg->punc_cache =diff --git a/runtime/websocket/bin/websocket-server.cpp b/runtime/websocket/bin/websocket-server.cppindex 99b150f89..f1cd38b46 100644--- a/runtime/websocket/bin/websocket-server.cpp+++ b/runtime/websocket/bin/websocket-server.cpp@@ -144,7 +144,7 @@ void WebSocketServer::on_open(websocketpp::connection_hdl hdl) {data_msg->msg["wav_format"] = "pcm";data_msg->msg["wav_name"] = "wav-default-id";data_msg->msg["itn"] = true;- data_msg->msg["audio_fs"] = 16000;+ data_msg->msg["audio_fs"] = 16000; // default is 16kdata_msg->msg["access_num"] = 0; // the number of access for this object, when it is 0, we can free it saftlydata_msg->msg["is_eof"]=false;FUNASR_DEC_HANDLE decoder_handle =