雾聪
2024-04-01 d93002b5b8e0d12c726566958140e632eb6c9b3a
fix padding
5个文件已修改
13 ■■■■ 已修改文件
runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
runtime/onnxruntime/bin/funasr-onnx-offline.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
runtime/onnxruntime/include/com-define.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
runtime/onnxruntime/src/paraformer-torch.cpp 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
runtime/websocket/bin/funasr-wss-server.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cpp
@@ -144,7 +144,7 @@
    TCLAP::ValueArg<std::int32_t> thread_num("", THREAD_NUM, "multi-thread num for rtf", false, 1, "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("", INFER_GPU, "Whether to use GPU for inference, default is false", false);
    TCLAP::ValueArg<std::int32_t> batch_size("", "batch-size", "batch_size for ASR model when using GPU", false, 1, "int32_t");
    TCLAP::ValueArg<std::int32_t> batch_size("", BATCHSIZE, "batch_size for ASR model when using GPU", false, 1, "int32_t");
    cmd.add(model_dir);
    cmd.add(quantize);
runtime/onnxruntime/bin/funasr-onnx-offline.cpp
@@ -60,7 +60,7 @@
    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("", INFER_GPU, "Whether to use GPU for inference, default is false", false);
    TCLAP::ValueArg<std::int32_t> batch_size("", "batch-size", "batch_size for ASR model when using GPU", false, 5, "int32_t");
    TCLAP::ValueArg<std::int32_t> batch_size("", BATCHSIZE, "batch_size for ASR model when using GPU", false, 5, "int32_t");
    cmd.add(model_dir);
    cmd.add(quantize);
runtime/onnxruntime/include/com-define.h
@@ -51,6 +51,7 @@
#define QUANT_MODEL_NAME "model_quant.onnx"
// gpu models
#define INFER_GPU "gpu"
#define BATCHSIZE "batch-size"
#define TORCH_MODEL_NAME "model.torchscripts"
#define TORCH_QUANT_MODEL_NAME "model_quant.torchscripts"
#define BLADE_MODEL_NAME "model.blade.fp16.pt"
runtime/onnxruntime/src/paraformer-torch.cpp
@@ -281,10 +281,10 @@
        if(asr_feats.size() != 0){
            LfrCmvn(asr_feats);
        }
        int32_t num_frames  = asr_feats.size() / feature_dim;
        int32_t num_frames  = asr_feats.size();
        paraformer_length.emplace_back(num_frames);
        if(max_size < asr_feats.size()){
            max_size = asr_feats.size();
        if(max_size < asr_feats.size()*feature_dim){
            max_size = asr_feats.size()*feature_dim;
            max_frames = num_frames;
        }
runtime/websocket/bin/funasr-wss-server.cpp
@@ -126,7 +126,7 @@
    TCLAP::ValueArg<std::int32_t> fst_inc_wts("", FST_INC_WTS, 
        "the fst hotwords incremental bias", false, 20, "int32_t");
    TCLAP::SwitchArg use_gpu("", INFER_GPU, "Whether to use GPU, default is false", false);
    TCLAP::ValueArg<std::int32_t> batch_size("", "batch-size", "batch_size for ASR model when using GPU", false, 5, "int32_t");
    TCLAP::ValueArg<std::int32_t> batch_size("", BATCHSIZE, "batch_size for ASR model when using GPU", false, 5, "int32_t");
    // add file
    cmd.add(hotword);