From 19bda23f5e87e91bb7363e988fba842a69be36ae Mon Sep 17 00:00:00 2001
From: 九耳 <mengzhe.cmz@alibaba-inc.com>
Date: 星期四, 30 三月 2023 14:20:35 +0800
Subject: [PATCH] fix
---
funasr/runtime/python/onnxruntime/funasr_onnx/punc_bin.py | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/funasr/runtime/python/onnxruntime/funasr_onnx/punc_bin.py b/funasr/runtime/python/onnxruntime/funasr_onnx/punc_bin.py
index 64ced69..8ea4517 100644
--- a/funasr/runtime/python/onnxruntime/funasr_onnx/punc_bin.py
+++ b/funasr/runtime/python/onnxruntime/funasr_onnx/punc_bin.py
@@ -32,8 +32,7 @@
self.ort_infer = OrtInferSession(model_file, device_id, intra_op_num_threads=intra_op_num_threads)
self.batch_size = 1
- self.encoder_conf = config["encoder_conf"]
- self.punc_list = config.punc_list
+ self.punc_list = config['punc_list']
self.period = 0
for i in range(len(self.punc_list)):
if self.punc_list[i] == ",":
@@ -44,13 +43,13 @@
self.period = i
self.preprocessor = CodeMixTokenizerCommonPreprocessor(
train=False,
- token_type=config.token_type,
- token_list=config.token_list,
- bpemodel=config.bpemodel,
- text_cleaner=config.cleaner,
- g2p_type=config.g2p,
+ token_type=config['token_type'],
+ token_list=config['token_list'],
+ bpemodel=config['bpemodel'],
+ text_cleaner=config['cleaner'],
+ g2p_type=config['g2p'],
text_name="text",
- non_linguistic_symbols=config.non_linguistic_symbols,
+ non_linguistic_symbols=config['non_linguistic_symbols'],
)
def __call__(self, text: Union[list, str], split_size=20):
--
Gitblit v1.9.1