From d8b586e02cd14f7eed6b330bd4f110cb1e7f24ad Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期二, 09 一月 2024 20:33:12 +0800
Subject: [PATCH] funasr1.0 modelscope
---
funasr/models/monotonic_aligner/model.py | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/funasr/models/monotonic_aligner/model.py b/funasr/models/monotonic_aligner/model.py
index a0d745f..584b692 100644
--- a/funasr/models/monotonic_aligner/model.py
+++ b/funasr/models/monotonic_aligner/model.py
@@ -188,9 +188,12 @@
text_postprocessed, time_stamp_postprocessed, _ = postprocess_utils.sentence_postprocess(token, timestamp)
result_i = {"key": key[i], "text": text_postprocessed,
"timestamp": time_stamp_postprocessed,
- }
- # ibest_writer["token"][key[i]] = " ".join(token)
- ibest_writer["timestamp_list"][key[i]] = time_stamp_postprocessed
- ibest_writer["timestamp_str"][key[i]] = timestamp_str
+ }
results.append(result_i)
+
+ if ibest_writer:
+ # ibest_writer["token"][key[i]] = " ".join(token)
+ ibest_writer["timestamp_list"][key[i]] = time_stamp_postprocessed
+ ibest_writer["timestamp_str"][key[i]] = timestamp_str
+
return results, meta_data
\ No newline at end of file
--
Gitblit v1.9.1