From 96d637a58be9f9a263e8cb8a2dd7a782c0d3dfd2 Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期四, 26 一月 2023 14:06:12 +0800
Subject: [PATCH] Merge pull request #44 from fangd123/dev
---
funasr/bin/asr_inference_paraformer_vad_punc.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/funasr/bin/asr_inference_paraformer_vad_punc.py b/funasr/bin/asr_inference_paraformer_vad_punc.py
index a8af835..7a539e4 100644
--- a/funasr/bin/asr_inference_paraformer_vad_punc.py
+++ b/funasr/bin/asr_inference_paraformer_vad_punc.py
@@ -3,6 +3,7 @@
import logging
import sys
import time
+import json
from pathlib import Path
from typing import Optional
from typing import Sequence
@@ -637,8 +638,9 @@
postprocessed_result[2]
if len(word_lists) > 0:
text_postprocessed_punc, punc_id_list = text2punc(word_lists, 20)
- text_postprocessed_punc_time_stamp = "predictions: {} time_stamp: {}".format(
- text_postprocessed_punc, time_stamp_postprocessed)
+ text_postprocessed_punc_time_stamp = json.dumps({"predictions": text_postprocessed_punc,
+ "time_stamp": time_stamp_postprocessed},
+ ensure_ascii=False)
else:
text_postprocessed_punc = ""
punc_id_list = []
--
Gitblit v1.9.1