From 4413d1eb47fa400277c8a9625aa0bd5c424a2fab Mon Sep 17 00:00:00 2001
From: zhaomingwork <61895407+zhaomingwork@users.noreply.github.com>
Date: 星期四, 06 七月 2023 10:13:32 +0800
Subject: [PATCH] Python ws client slow problem for multiple files in offline mode (#716)
---
funasr/runtime/onnxruntime/src/paraformer.h | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/funasr/runtime/onnxruntime/src/paraformer.h b/funasr/runtime/onnxruntime/src/paraformer.h
index 3aa7057..9df0977 100644
--- a/funasr/runtime/onnxruntime/src/paraformer.h
+++ b/funasr/runtime/onnxruntime/src/paraformer.h
@@ -4,12 +4,9 @@
*/
#pragma once
-#ifndef PARAFORMER_MODELIMP_H
-#define PARAFORMER_MODELIMP_H
-
#include "precomp.h"
-namespace paraformer {
+namespace funasr {
class Paraformer : public Model {
/**
@@ -21,7 +18,7 @@
//std::unique_ptr<knf::OnlineFbank> fbank_;
knf::FbankOptions fbank_opts;
- Vocab* vocab;
+ Vocab* vocab = nullptr;
vector<float> means_list;
vector<float> vars_list;
const float scale = 22.6274169979695;
@@ -33,7 +30,7 @@
void ApplyCmvn(vector<float> *v);
string GreedySearch( float* in, int n_len, int64_t token_nums);
- std::shared_ptr<Ort::Session> m_session;
+ std::shared_ptr<Ort::Session> m_session = nullptr;
Ort::Env env_;
Ort::SessionOptions session_options;
@@ -52,5 +49,4 @@
string Rescoring();
};
-} // namespace paraformer
-#endif
+} // namespace funasr
--
Gitblit v1.9.1