From 5c507c32d21e342d48d850a7df691780e9c5c3c7 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期二, 11 六月 2024 13:53:11 +0800
Subject: [PATCH] wechat
---
funasr/auto/auto_model.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/funasr/auto/auto_model.py b/funasr/auto/auto_model.py
index e8ca008..9b4f6d9 100644
--- a/funasr/auto/auto_model.py
+++ b/funasr/auto/auto_model.py
@@ -359,6 +359,7 @@
results_sorted = []
if not len(sorted_data):
+ results_ret_list.append({"key": key, "text": "", "timestamp": []})
logging.info("decoding, utt: {}, empty speech".format(key))
continue
@@ -387,6 +388,7 @@
):
max_len_in_batch = max(max_len_in_batch, sample_length)
end_idx += 1
+ results_sorted.append({'key': 'bad_data', 'text': '', 'timestamp': []})
continue
speech_j, speech_lengths_j = slice_padding_audio_samples(
@@ -416,7 +418,7 @@
end_idx += 1
max_len_in_batch = sample_length
if len(results) < 1:
- continue
+ results.append({'key': 'bad_data', 'text': '', 'timestamp': []})
results_sorted.extend(results)
# end_asr_total = time.time()
--
Gitblit v1.9.1