Spaces:
Sleeping
Sleeping
Siddhant
commited on
Commit
·
103c240
1
Parent(s):
1e42459
E2E Spoken Dialogue Demo Recipe
Browse files
app.py
CHANGED
@@ -323,7 +323,12 @@ def transcribe(stream, new_chunk, option, asr_option):
|
|
323 |
print("VAD: end of speech detected")
|
324 |
start_time = time.time()
|
325 |
if client is not None:
|
326 |
-
|
|
|
|
|
|
|
|
|
|
|
327 |
asr_output_str=""
|
328 |
latency_TTS=(time.time() - start_time)
|
329 |
else:
|
|
|
323 |
print("VAD: end of speech detected")
|
324 |
start_time = time.time()
|
325 |
if client is not None:
|
326 |
+
try:
|
327 |
+
(text_str, audio_output)=client(array, orig_sr)
|
328 |
+
except Exception as e:
|
329 |
+
text_str=""
|
330 |
+
audio_output=None
|
331 |
+
raise gr.Error(f"Error during audio streaming: {e}")
|
332 |
asr_output_str=""
|
333 |
latency_TTS=(time.time() - start_time)
|
334 |
else:
|