add fix for output.wav not existing
Browse files
app.py
CHANGED
@@ -20,6 +20,8 @@ def download_video(url):
|
|
20 |
def split_audio(mindur, maxdur, name_for_split_files, show_amount_of_files_and_file_dur):
|
21 |
if show_amount_of_files_and_file_dur == True:
|
22 |
gr.Warning(f"show_amount_of_files_and_file_dur set to True. This feature may be inaccurate especially for WAV files, so dont rely too much on the count and duration.")
|
|
|
|
|
23 |
if mindur == maxdur:
|
24 |
raise gr.Error(f"Cannot split mindur={mindur} and maxdur={maxdur}, min and max are the same number.")
|
25 |
elif mindur > maxdur:
|
|
|
20 |
def split_audio(mindur, maxdur, name_for_split_files, show_amount_of_files_and_file_dur):
|
21 |
if show_amount_of_files_and_file_dur == True:
|
22 |
gr.Warning(f"show_amount_of_files_and_file_dur set to True. This feature may be inaccurate especially for WAV files, so dont rely too much on the count and duration.")
|
23 |
+
if not os.path.exists("output.wav"):
|
24 |
+
raise gr.Error("Output.wav does not exist! Did you do the first tab correctly or at all?")
|
25 |
if mindur == maxdur:
|
26 |
raise gr.Error(f"Cannot split mindur={mindur} and maxdur={maxdur}, min and max are the same number.")
|
27 |
elif mindur > maxdur:
|