From 1b5c15aa7cf65e6af7c68fe981c286a4538738b0 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 13 二月 2023 19:08:05 +0800
Subject: [PATCH] export model

---
 funasr/runtime/python/onnxruntime/paraformer/rapid_paraformer/paraformer_onnx.py |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/funasr/runtime/python/onnxruntime/paraformer/rapid_paraformer/paraformer_onnx.py b/funasr/runtime/python/onnxruntime/paraformer/rapid_paraformer/paraformer_onnx.py
index ca3d566..f8fe063 100644
--- a/funasr/runtime/python/onnxruntime/paraformer/rapid_paraformer/paraformer_onnx.py
+++ b/funasr/runtime/python/onnxruntime/paraformer/rapid_paraformer/paraformer_onnx.py
@@ -9,10 +9,10 @@
 import librosa
 import numpy as np
 
-from .utils import (CharTokenizer, Hypothesis, ONNXRuntimeError,
+from .utils.utils import (CharTokenizer, Hypothesis, ONNXRuntimeError,
                     OrtInferSession, TokenIDConverter, WavFrontend, get_logger,
                     read_yaml)
-from .postprocess_utils import sentence_postprocess
+from .utils.postprocess_utils import sentence_postprocess
 
 logging = get_logger()
 
@@ -139,13 +139,4 @@
         # text = self.tokenizer.tokens2text(token)
         return text
 
-
-if __name__ == '__main__':
-    project_dir = Path(__file__).resolve().parent.parent
-    model_dir = "/home/zhifu.gzf/.cache/modelscope/hub/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch"
-    model = Paraformer(model_dir)
-
-    wav_file = os.path.join(model_dir, 'example/asr_example.wav')
-    result = model(wav_file)
-    print(result)
 

--
Gitblit v1.9.1