Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -105,11 +105,11 @@ def process_audio_text(audio):
|
|
105 |
|
106 |
if audio_data is not None:
|
107 |
sr, audio_array = audio_data
|
108 |
-
yield
|
109 |
else:
|
110 |
-
yield
|
111 |
except Exception as e:
|
112 |
-
yield f"Error: {str(e)}"
|
113 |
finally:
|
114 |
# 清理临时文件
|
115 |
if audio_path and audio_path != audio and os.path.exists(audio_path):
|
@@ -141,4 +141,4 @@ if __name__ == "__main__":
|
|
141 |
allow_flagging="never"
|
142 |
)
|
143 |
|
144 |
-
iface.launch(server_name="0.0.0.0", server_port=7860, share=
|
|
|
105 |
|
106 |
if audio_data is not None:
|
107 |
sr, audio_array = audio_data
|
108 |
+
yield (sr, audio_array), accumulated_text
|
109 |
else:
|
110 |
+
yield None, accumulated_text
|
111 |
except Exception as e:
|
112 |
+
yield None, f"Error: {str(e)}"
|
113 |
finally:
|
114 |
# 清理临时文件
|
115 |
if audio_path and audio_path != audio and os.path.exists(audio_path):
|
|
|
141 |
allow_flagging="never"
|
142 |
)
|
143 |
|
144 |
+
iface.launch(server_name="0.0.0.0", server_port=7860, share=False)
|