“583c62db772870097692d1ce19af1b3189a21ca8”上不存在“runtime/engine/asr/recognizer/recognizer_batch_main2.cc”
未验证 提交 d2da7f50 编写于 作者: Z Zhao Yuting 提交者: GitHub

Update text_engine.py

precommihted already
上级 82f731c1
...@@ -107,10 +107,11 @@ class PaddleTextConnectionHandler: ...@@ -107,10 +107,11 @@ class PaddleTextConnectionHandler:
assert len(tokens) == len(labels) assert len(tokens) == len(labels)
text = '' text = ''
print(self._punc_list)
for t, l in zip(tokens, labels): for t, l in zip(tokens, labels):
text += t text += t
if l != 0: # Non punc. if l != 0: # Non punc.
text += self._punc_list[l] text += self._punc_list[l - 1]
return text return text
else: else:
...@@ -160,7 +161,7 @@ class TextEngine(BaseEngine): ...@@ -160,7 +161,7 @@ class TextEngine(BaseEngine):
return False return False
self.executor = TextServerExecutor() self.executor = TextServerExecutor()
self.executor._init_from_path( self.executor._init_from_path_new(
task=config.task, task=config.task,
model_type=config.model_type, model_type=config.model_type,
lang=config.lang, lang=config.lang,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册