From 2f7e99e1dd30ce8be0e69aa25efe88179cfeb77b Mon Sep 17 00:00:00 2001
From: speech_asr <wangjiaming.wjm@alibaba-inc.com>
Date: 星期四, 23 二月 2023 10:41:20 +0800
Subject: [PATCH] update docs

---
 funasr/bin/asr_inference_paraformer_vad_punc.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/funasr/bin/asr_inference_paraformer_vad_punc.py b/funasr/bin/asr_inference_paraformer_vad_punc.py
index a6e1394..8621ab4 100644
--- a/funasr/bin/asr_inference_paraformer_vad_punc.py
+++ b/funasr/bin/asr_inference_paraformer_vad_punc.py
@@ -47,6 +47,8 @@
 from funasr.bin.punctuation_infer import Text2Punc
 from funasr.models.e2e_asr_paraformer import BiCifParaformer, ContextualParaformer
 
+from FunASR.funasr.utils.timestamp_tools import time_stamp_sentence
+
 header_colors = '\033[95m'
 end_colors = '\033[0m'
 
@@ -738,6 +740,7 @@
                     text_postprocessed, word_lists = postprocessed_result[0], postprocessed_result[1]
 
                 text_postprocessed_punc = text_postprocessed
+                punc_id_list = []
                 if len(word_lists) > 0 and text2punc is not None:
                     text_postprocessed_punc, punc_id_list = text2punc(word_lists, 20)
 
@@ -747,6 +750,8 @@
                 if time_stamp_postprocessed != "":
                     item['time_stamp'] = time_stamp_postprocessed
 
+                item['sentences'] = time_stamp_sentence(punc_id_list, time_stamp_postprocessed, text_postprocessed)
+
                 asr_result_list.append(item)
                 finish_count += 1
                 # asr_utils.print_progress(finish_count / file_count)

--
Gitblit v1.9.1