Spaces:
Sleeping
Sleeping
akshansh36
commited on
Commit
•
29a8fba
1
Parent(s):
0d5ee3c
Update app.py
Browse files
app.py
CHANGED
@@ -255,6 +255,10 @@ def run(audio_files, file_m, file_index):
|
|
255 |
|
256 |
|
257 |
def process_audio(audio_files, file_m, file_index):
|
|
|
|
|
|
|
|
|
258 |
result, first_audio = run(audio_files, file_m, file_index)
|
259 |
|
260 |
# Ensure first_audio is correctly formatted as a valid file path
|
@@ -285,7 +289,7 @@ def index_conf():
|
|
285 |
def audio_conf():
|
286 |
return gr.Audio(
|
287 |
label="Upload or Record Audio",
|
288 |
-
|
289 |
type="filepath",
|
290 |
file_count="single",
|
291 |
)
|
|
|
255 |
|
256 |
|
257 |
def process_audio(audio_files, file_m, file_index):
|
258 |
+
|
259 |
+
if not isinstance(audio_files, list):
|
260 |
+
audio_files = [audio_files]
|
261 |
+
|
262 |
result, first_audio = run(audio_files, file_m, file_index)
|
263 |
|
264 |
# Ensure first_audio is correctly formatted as a valid file path
|
|
|
289 |
def audio_conf():
|
290 |
return gr.Audio(
|
291 |
label="Upload or Record Audio",
|
292 |
+
sources=["upload", "microphone"], # Allows recording via microphone
|
293 |
type="filepath",
|
294 |
file_count="single",
|
295 |
)
|