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
update com define
雾聪3549c0106e5a
diff --git a/runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cpp b/runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cppindex b8d24bb95..d9a3c510f 100644--- a/runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cpp+++ b/runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cpp@@ -142,7 +142,7 @@ int main(int argc, char *argv[])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");- TCLAP::SwitchArg use_gpu("", USE_GPU, "Whether to use GPU for inference, default is false", false);+ TCLAP::SwitchArg use_gpu("", INFER_GPU, "Whether to use GPU for inference, default is false", false);cmd.add(model_dir);cmd.add(quantize);diff --git a/runtime/onnxruntime/bin/funasr-onnx-offline.cpp b/runtime/onnxruntime/bin/funasr-onnx-offline.cppindex c2a52368e..988787e58 100644--- a/runtime/onnxruntime/bin/funasr-onnx-offline.cpp+++ b/runtime/onnxruntime/bin/funasr-onnx-offline.cpp@@ -58,7 +58,7 @@ int main(int argc, char** argv)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");- TCLAP::SwitchArg use_gpu("", USE_GPU, "Whether to use GPU for inference, default is false", false);+ TCLAP::SwitchArg use_gpu("", INFER_GPU, "Whether to use GPU for inference, default is false", false);cmd.add(model_dir);cmd.add(quantize);diff --git a/runtime/onnxruntime/include/com-define.h b/runtime/onnxruntime/include/com-define.hindex 6af2527f2..70e1495ea 100644--- a/runtime/onnxruntime/include/com-define.h+++ b/runtime/onnxruntime/include/com-define.h@@ -50,7 +50,7 @@ namespace funasr {#define MODEL_EB_NAME "model_eb.onnx"#define QUANT_MODEL_NAME "model_quant.onnx"// gpu models-#define USE_GPU "gpu"+#define INFER_GPU "gpu"#define TORCH_MODEL_NAME "model.gpu.torchscripts"#define TORCH_QUANT_MODEL_NAME "model.blade.fp16.pt"diff --git a/runtime/websocket/bin/funasr-wss-server.cpp b/runtime/websocket/bin/funasr-wss-server.cppindex 48ef454ca..3da7239dd 100644--- a/runtime/websocket/bin/funasr-wss-server.cpp+++ b/runtime/websocket/bin/funasr-wss-server.cpp@@ -121,7 +121,7 @@ int main(int argc, char* argv[]) {false, "/workspace/resources/hotwords.txt", "string");TCLAP::ValueArg<std::int32_t> fst_inc_wts("", FST_INC_WTS,"the fst hotwords incremental bias", false, 20, "int32_t");- TCLAP::SwitchArg use_gpu("", USE_GPU, "Whether to use GPU, default is false", false);+ TCLAP::SwitchArg use_gpu("", INFER_GPU, "Whether to use GPU, default is false", false);// add filecmd.add(hotword);