Spaces:
Runtime error
Runtime error
fix bugs
Browse files
app.py
CHANGED
@@ -197,7 +197,6 @@ def inference_with_auto_rerank(
|
|
197 |
use_auto_rerank,
|
198 |
streaming=False,
|
199 |
):
|
200 |
-
|
201 |
max_attempts = 2 if use_auto_rerank else 1
|
202 |
best_wer = float("inf")
|
203 |
best_audio = None
|
@@ -218,9 +217,14 @@ def inference_with_auto_rerank(
|
|
218 |
)
|
219 |
|
220 |
# 获取音频数据
|
221 |
-
|
222 |
-
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
if audio is None:
|
226 |
return None, None, message
|
@@ -243,6 +247,7 @@ def inference_with_auto_rerank(
|
|
243 |
|
244 |
return None, (best_sample_rate, best_audio), None
|
245 |
|
|
|
246 |
n_audios = 4
|
247 |
|
248 |
global_audio_list = []
|
|
|
197 |
use_auto_rerank,
|
198 |
streaming=False,
|
199 |
):
|
|
|
200 |
max_attempts = 2 if use_auto_rerank else 1
|
201 |
best_wer = float("inf")
|
202 |
best_audio = None
|
|
|
217 |
)
|
218 |
|
219 |
# 获取音频数据
|
220 |
+
result = None
|
221 |
+
for item in audio_generator:
|
222 |
+
result = item
|
223 |
+
|
224 |
+
if result is None:
|
225 |
+
return None, None, "No audio generated"
|
226 |
+
|
227 |
+
_, (sample_rate, audio), message = result
|
228 |
|
229 |
if audio is None:
|
230 |
return None, None, message
|
|
|
247 |
|
248 |
return None, (best_sample_rate, best_audio), None
|
249 |
|
250 |
+
|
251 |
n_audios = 4
|
252 |
|
253 |
global_audio_list = []
|