Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -294,6 +294,12 @@ def run(
|
|
294 |
if isinstance(audio_files, str):
|
295 |
audio_files = [audio_files]
|
296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
if file_m is not None and file_m.endswith(".txt"):
|
298 |
file_m, file_index = find_my_model(file_m, file_index)
|
299 |
print(file_m, file_index)
|
|
|
294 |
if isinstance(audio_files, str):
|
295 |
audio_files = [audio_files]
|
296 |
|
297 |
+
try:
|
298 |
+
duration_base = librosa.get_duration(filename=audio_files[0])
|
299 |
+
print("Duration:", duration_base)
|
300 |
+
except Exception as e:
|
301 |
+
print(e)
|
302 |
+
|
303 |
if file_m is not None and file_m.endswith(".txt"):
|
304 |
file_m, file_index = find_my_model(file_m, file_index)
|
305 |
print(file_m, file_index)
|