Spaces:
Runtime error
Runtime error
Commit
·
2337adf
1
Parent(s):
e0fdf16
Update app.py
Browse files
app.py
CHANGED
@@ -19,6 +19,8 @@ def get_chunk_times(in_filename, silence_threshold, silence_duration=1):
|
|
19 |
silence_duration_re = re.compile('silence_duration: (\d+.\d+)')
|
20 |
silence_end_re = re.compile('silence_end: (\d+.\d+)\s')
|
21 |
|
|
|
|
|
22 |
command = f"ffmpeg -i {in_filename} -af silencedetect=n=-{silence_threshold}dB:d={silence_duration} -f null - "
|
23 |
out = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
24 |
|
@@ -80,8 +82,6 @@ oplot = gr.outputs.Image(type="plot", label=None)
|
|
80 |
|
81 |
iaudio = gr.inputs.Audio(source="upload", type="filepath", label=None)
|
82 |
|
83 |
-
#iface = gr.Interface(audio, iaudio, [otext, oplot])
|
84 |
-
|
85 |
iface = gr.Interface(
|
86 |
get_audio_info,
|
87 |
iaudio,
|
|
|
19 |
silence_duration_re = re.compile('silence_duration: (\d+.\d+)')
|
20 |
silence_end_re = re.compile('silence_end: (\d+.\d+)\s')
|
21 |
|
22 |
+
logging.info(f"File {in_filename} exists? = {os.path.exists(in_filename)}")
|
23 |
+
|
24 |
command = f"ffmpeg -i {in_filename} -af silencedetect=n=-{silence_threshold}dB:d={silence_duration} -f null - "
|
25 |
out = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
26 |
|
|
|
82 |
|
83 |
iaudio = gr.inputs.Audio(source="upload", type="filepath", label=None)
|
84 |
|
|
|
|
|
85 |
iface = gr.Interface(
|
86 |
get_audio_info,
|
87 |
iaudio,
|