From 3cd71a385a31f987f2db99df902ca36ee02b1813 Mon Sep 17 00:00:00 2001
From: 九耳 <mengzhe.cmz@alibaba-inc.com>
Date: 星期四, 30 三月 2023 17:29:12 +0800
Subject: [PATCH] change name

---
 funasr/runtime/python/utils/infer.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/funasr/runtime/python/utils/infer.py b/funasr/runtime/python/utils/infer.py
index f44a884..e27e393 100644
--- a/funasr/runtime/python/utils/infer.py
+++ b/funasr/runtime/python/utils/infer.py
@@ -15,9 +15,9 @@
 args = parser.parse_args()
 
 
-from funasr.runtime.python.libtorch.torch_paraformer import Paraformer
+from funasr.runtime.python.libtorch.funasr_torch import Paraformer
 if args.backend == "onnx":
-	from funasr.runtime.python.onnxruntime.rapid_paraformer import Paraformer
+	from funasr.runtime.python.onnxruntime.funasr_onnx import Paraformer
 	
 model = Paraformer(args.model_dir, batch_size=1, quantize=args.quantize, intra_op_num_threads=args.intra_op_num_threads)
 
@@ -37,8 +37,8 @@
 for i, wav_path_i in enumerate(wav_files):
 	wav_name, wav_path = wav_path_i.strip().split()
 	result = model(wav_path)
-	text_i = "{} {}\n".format(wav_name, result[0])
-	token_i = "{} {}\n".format(wav_name, result[1])
+	text_i = "{} {}\n".format(wav_name, result[0]['preds'][0])
+	token_i = "{} {}\n".format(wav_name, result[0]['preds'][1])
 	text_f.write(text_i)
 	text_f.flush()
 	token_f.write(token_i)

--
Gitblit v1.9.1