| runtime/onnxruntime/readme.md | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| runtime/onnxruntime/src/paraformer.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| runtime/run_server.sh | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| runtime/run_server_2pass.sh | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| runtime/websocket/readme_zh.md | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
runtime/onnxruntime/readme.md
@@ -53,4 +53,8 @@ cd build cmake ../ -D FFMPEG_DIR=d:/ffmpeg-master-latest-win64-gpl-shared -D ONNXRUNTIME_DIR=d:/onnxruntime-win-x64-1.16.1 ``` Visual Studio open FunASR/runtime/onnxruntime/build/FunASROnnx.sln start build Visual Studio open FunASR/runtime/onnxruntime/build/FunASROnnx.sln start build. After compilation, the executable file is located here: FunASR/runtime/onnxruntime/build/bin/Debug. Copy the required DLL libraries from (onnxruntime-win-x64-1.16.1/lib, ffmpeg-master-latest-win64-gpl-shared/bin) to this location: FunASR/runtime/onnxruntime/build/bin/Debug runtime/onnxruntime/src/paraformer.cpp
@@ -191,9 +191,13 @@ try { lm_ = std::shared_ptr<fst::Fst<fst::StdArc>>( fst::Fst<fst::StdArc>::Read(lm_file)); if (vocab) { delete vocab; } vocab = new Vocab(lm_cfg_file.c_str()); LOG(INFO) << "Successfully load lm file " << lm_file; if (lm_){ if (vocab) { delete vocab; } vocab = new Vocab(lm_cfg_file.c_str()); LOG(INFO) << "Successfully load lm file " << lm_file; }else{ LOG(ERROR) << "Failed to load lm file " << lm_file; } } catch (std::exception const &e) { LOG(ERROR) << "Error when load lm file: " << e.what(); exit(0); runtime/run_server.sh
@@ -6,6 +6,7 @@ itn_dir="thuduj12/fst_itn_zh" lm_dir="damo/speech_ngram_lm_zh-cn-ai-wesp-fst" decoder_thread_num=32 model_thread_num=1 io_thread_num=8 port=10095 certfile="../../../ssl_key/server.crt" @@ -25,6 +26,7 @@ --lm-dir "${lm_dir}" \ --decoder-thread-num ${decoder_thread_num} \ --io-thread-num ${io_thread_num} \ --model-thread-num ${model_thread_num} \ --port ${port} \ --certfile "" \ --keyfile "" \ @@ -38,6 +40,7 @@ --itn-dir "${itn_dir}" \ --lm-dir "${lm_dir}" \ --decoder-thread-num ${decoder_thread_num} \ --model-thread-num ${model_thread_num} \ --io-thread-num ${io_thread_num} \ --port ${port} \ --certfile "${certfile}" \ runtime/run_server_2pass.sh
@@ -6,6 +6,7 @@ punc_dir="damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx" itn_dir="thuduj12/fst_itn_zh" decoder_thread_num=32 model_thread_num=1 io_thread_num=8 port=10095 certfile="../../../ssl_key/server.crt" @@ -24,6 +25,7 @@ --punc-dir "${punc_dir}" \ --itn-dir "${itn_dir}" \ --decoder-thread-num ${decoder_thread_num} \ --model-thread-num ${model_thread_num} \ --io-thread-num ${io_thread_num} \ --port ${port} \ --certfile "" \ @@ -38,6 +40,7 @@ --punc-dir "${punc_dir}" \ --itn-dir "${itn_dir}" \ --decoder-thread-num ${decoder_thread_num} \ --model-thread-num ${model_thread_num} \ --io-thread-num ${io_thread_num} \ --port ${port} \ --certfile "${certfile}" \ runtime/websocket/readme_zh.md
@@ -72,5 +72,7 @@ cd build cmake ../ -D OPENSSL_ROOT_DIR=d:/openssl-1.1.1w -D FFMPEG_DIR=d:/ffmpeg-master-latest-win64-gpl-shared -D ONNXRUNTIME_DIR=d:/onnxruntime-win-x64-1.16.1 ``` Visual Studio 打开 FunASR/runtime/websocket/build/FunASRWebscoket.sln 完成编译 Visual Studio 打开 FunASR/runtime/websocket/build/FunASRWebscoket.sln 完成编译; 编译后的可执行文件位于:FunASR/runtime/websocket/build/bin/Debug; 从 onnxruntime-win-x64-1.16.1/lib, ffmpeg-master-latest-win64-gpl-shared/bin copy相关的DLL库至: FunASR/runtime/onnxruntime/build/bin/Debug