csukuangfj
commited on
Commit
·
a702d26
1
Parent(s):
3f0ce41
minor fixes
Browse files
decode.py
CHANGED
@@ -118,6 +118,10 @@ def decode(
|
|
118 |
|
119 |
for seg, stream in zip(segments, streams):
|
120 |
seg.text = stream.result.text.strip()
|
|
|
|
|
|
|
|
|
121 |
if len(all_text) == 0:
|
122 |
all_text.append(seg.text)
|
123 |
elif len(all_text[-1][0].encode()) == 1 and len(seg.text[0].encode()) == 1:
|
|
|
118 |
|
119 |
for seg, stream in zip(segments, streams):
|
120 |
seg.text = stream.result.text.strip()
|
121 |
+
if len(seg.text) == 0:
|
122 |
+
logging.info("Skip empty segment")
|
123 |
+
continue
|
124 |
+
|
125 |
if len(all_text) == 0:
|
126 |
all_text.append(seg.text)
|
127 |
elif len(all_text[-1][0].encode()) == 1 and len(seg.text[0].encode()) == 1:
|