未验证 提交 903cc67a 编写于 作者: H Hui Zhang 提交者: GitHub

Merge pull request #1801 from Honei/v0.3

[R1.0]update the streaming output and punc default ip, port
......@@ -353,8 +353,8 @@ class ASRClientExecutor(BaseExecutor):
lang: str="zh_cn",
audio_format: str="wav",
protocol: str="http",
punc_server_ip: str="127.0.0.1",
punc_server_port: int=8091):
punc_server_ip: str=None,
punc_server_port: int=None):
"""Python API to call an executor.
Args:
......@@ -487,7 +487,6 @@ class TextClientExecutor(BaseExecutor):
input_ = args.input
server_ip = args.server_ip
port = args.port
output = args.output
try:
time_start = time.time()
......@@ -522,4 +521,4 @@ class TextClientExecutor(BaseExecutor):
res = requests.post(url=url, data=json.dumps(request))
response_dict = res.json()
punc_text = response_dict["result"]["punc_text"]
return punc_text
return punc_text
\ No newline at end of file
......@@ -63,7 +63,7 @@ class TextHttpHandler:
response_dict = res.json()
punc_text = response_dict["result"]["punc_text"]
except Exception as e:
logger.error(f"Call punctuation {self.url} occurs")
logger.error(f"Call punctuation {self.url} occurs error")
logger.error(e)
punc_text = text
......@@ -176,7 +176,7 @@ class ASRWsAudioHandler:
{
"name": "test.wav",
"signal": "end",
"nbest": 5
"nbest": 1
},
sort_keys=True,
indent=4,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册